Run ID:123269
提交时间:2025-06-28 17:00:05
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,sum,a,b; cin>>n; while(1){ a++; sum+=a; for(int b;b<sum;b++) { if(sum-2*b==n){ cout<<b<<" "<<a; } } } return 0; }