답안 #721221

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
721221 2023-04-10T14:09:36 Z vjudge1 Uzastopni (COCI17_uzastopni) C++17
24 / 80
1000 ms 316 KB
#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;
            }
        }
    }

	return 0;
}
/**
7 2 1
4 7
**/
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 316 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Execution timed out 1090 ms 212 KB Time limit exceeded
5 Execution timed out 1070 ms 212 KB Time limit exceeded
6 Execution timed out 1074 ms 212 KB Time limit exceeded
7 Execution timed out 1084 ms 212 KB Time limit exceeded
8 Execution timed out 1081 ms 212 KB Time limit exceeded
9 Execution timed out 1073 ms 212 KB Time limit exceeded
10 Execution timed out 1082 ms 212 KB Time limit exceeded