제출 #714148

#제출 시각아이디문제언어결과실행 시간메모리
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;
		}
	}
}

컴파일 시 표준 에러 (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...