답안 #608223

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
608223 2022-07-27T06:16:51 Z starchan Uzastopni (COCI17_uzastopni) C++17
0 / 80
1000 ms 65536 KB
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define in pair<int, int>
#define f first
#define s second
#define pb push_back
#define pob pop_back
#define INF (int)1e17
#define MX (int)3e5+5
#define fast() ios_base::sync_with_stdio(false); cin.tie(NULL)
signed main()
{
	fast();
	int n;
	cin >> n;
	for(int u = 1; u*u < 2*n; u++)
	{
		if((2*n)%u)
			continue;
		int v = (2*n)/u;
		u--;
		if(u%2 == v%2)
			cout << (v-u)/2 << " " << (v+u)/2 << "\n";		
	}
	return 0;
}	
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1085 ms 50508 KB Time limit exceeded
2 Execution timed out 1084 ms 63164 KB Time limit exceeded
3 Execution timed out 1073 ms 65536 KB Time limit exceeded
4 Execution timed out 1083 ms 65536 KB Time limit exceeded
5 Execution timed out 1083 ms 65536 KB Time limit exceeded
6 Execution timed out 1073 ms 65536 KB Time limit exceeded
7 Execution timed out 1081 ms 65536 KB Time limit exceeded
8 Execution timed out 1058 ms 65536 KB Time limit exceeded
9 Execution timed out 1081 ms 65536 KB Time limit exceeded
10 Execution timed out 1078 ms 65536 KB Time limit exceeded