답안 #721196

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
721196 2023-04-10T13:39:51 Z vjudge1 Uzastopni (COCI17_uzastopni) C++17
64 / 80
1000 ms 316 KB
#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;
            }
        }
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 14 ms 316 KB Output is correct
7 Correct 68 ms 212 KB Output is correct
8 Correct 742 ms 296 KB Output is correct
9 Execution timed out 1073 ms 212 KB Time limit exceeded
10 Execution timed out 1080 ms 212 KB Time limit exceeded