# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
892088 | 2023-12-24T18:59:05 Z | Isam | Uzastopni (COCI17_uzastopni) | C++17 | 1 ms | 508 KB |
#include<bits/stdc++.h> #ifdef DEBUG #include "debug.h" #else #define debug(...) void(37) #endif using namespace std; constexpr int sz = 1e5 + 5; signed main(){ ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); long long N; cin >> N; N <<= 1; for(register int i = 1; 1ll * i * i <= N; ++i){ if(N % i == 0){ if((i + N / i + 1) % 2 == 0){ int b = (i + N / i + 1) / 2; int a = b - i; --b; if(a > 0 && b > 0 && b > a){ cout << a << ' ' << b << '\n'; } } } } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 508 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 344 KB | Output is correct |
5 | Correct | 1 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 1 ms | 348 KB | Output is correct |
10 | Incorrect | 1 ms | 348 KB | Output isn't correct |