Run ID:72757
提交时间:2024-05-12 17:42:33
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int y = 1; int x = 1; while(1){ for(x = 1;x <= y;x++){ if((1+y)*y/2-2*x==n){ cout<<x<<" "<<y; } } y++; } return 0; }