Submission #714148

#TimeUsernameProblemLanguageResultExecution timeMemory
714148DepressedMGUzastopni (COCI17_uzastopni)C++17
64 / 80
1085 ms300 KiB
#include<bits/stdc++.h> #define ull unsigned long long using namespace std; int main(){ ull n,m,a,b,c,i,j,x,y; cin>>n; for(i=1;i<n;i++){ x=i; b=x*x-x+2*n; c=sqrt(b); if(c*c+c==b){ cout<<i<<" "<<c<<endl; } } }

Compilation message (stderr)

uzastopni.cpp: In function 'int main()':
uzastopni.cpp:5:8: warning: unused variable 'm' [-Wunused-variable]
    5 |  ull n,m,a,b,c,i,j,x,y;
      |        ^
uzastopni.cpp:5:10: warning: unused variable 'a' [-Wunused-variable]
    5 |  ull n,m,a,b,c,i,j,x,y;
      |          ^
uzastopni.cpp:5:18: warning: unused variable 'j' [-Wunused-variable]
    5 |  ull n,m,a,b,c,i,j,x,y;
      |                  ^
uzastopni.cpp:5:22: warning: unused variable 'y' [-Wunused-variable]
    5 |  ull n,m,a,b,c,i,j,x,y;
      |                      ^
#Verdict Execution timeMemoryGrader output
Fetching results...