답안 #714148

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
714148 2023-03-24T03:13:40 Z DepressedMG Uzastopni (COCI17_uzastopni) C++17
64 / 80
1000 ms 300 KB
#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

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;
      |                      ^
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 300 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 6 ms 300 KB Output is correct
7 Correct 27 ms 300 KB Output is correct
8 Correct 265 ms 212 KB Output is correct
9 Execution timed out 1065 ms 212 KB Time limit exceeded
10 Execution timed out 1085 ms 212 KB Time limit exceeded