Submission #721196

#TimeUsernameProblemLanguageResultExecution timeMemory
721196vjudge1Uzastopni (COCI17_uzastopni)C++17
64 / 80
1080 ms316 KiB
#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 timeMemoryGrader output
Fetching results...