Run ID:72756

提交时间:2024-05-12 17:42:00

#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int y = 1; int x = 1; while(5 > 0){ for(x = 1;x <= y; x++){ if((1+y)*y/2-2*x == n){ cout << x << " " << y; return 0 ; } } y++; } return 0; }