# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
721196 | vjudge1 | Uzastopni (COCI17_uzastopni) | C++17 | 1080 ms | 316 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int32_t main(){
ios_base::sync_with_stdio(0);cin.tie(0);
ll N;cin >> N;
for(int i = 1;i <= (N / 2) + 1;i++){
int res = 0;
for(int j = i;j <= N;j++){
res += j;
if(res >= N){
if(res == N){
cout << i << " " << j << "\n";
}
break;
}
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |