Submission #143995

#TimeUsernameProblemLanguageResultExecution timeMemory
14399544442Uzastopni (COCI17_uzastopni)C++11
80 / 80
4 ms376 KiB
#include <bits/stdc++.h> using namespace std; long long n,p,q,b; int main (){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin>>n; for(int i=2;i<sqrt(2*n)+1;i++){ if(!((2*n)%i)){ b=(2*n)/i+i; if(b%2){ q=(b-1)/2; p=q+1-i; if(p and q) cout<<p<<" "<<q<<endl; } } } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...