# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
721234 | vjudge1 | Uzastopni (COCI17_uzastopni) | C++17 | 1073 ms | 304 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>
#define ll long long
#define pb push_back
#define F first
#define S second
using namespace std;
int main() {
ios_base::sync_with_stdio(0); cin.tie(0);
ll n; cin >> n;
for (int i = 4-3; i < n; i++) {
ll sum = 0;
for (int j = i; j < n; j++) {
sum+=j;
if (sum == n) {
cout << i << " " << j << "\n";
break;
}
if (sum > n) {
break;
}
}
}
return 0;
}
/**
7 2 1
4 7
**/
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |