結果
| 問題 | No.395 永遠の17歳 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-31 15:12:41 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 368 bytes |
| 記録 | |
| コンパイル時間 | 2,791 ms |
| コンパイル使用メモリ | 275,204 KB |
| 実行使用メモリ | 11,964 KB |
| 最終ジャッジ日時 | 2026-07-04 08:29:54 |
| 合計ジャッジ時間 | 3,827 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;
int a;
int main() {
cin >> a;
for (int x = 8; ; x++) {
int b = x + 7;
if (a == b) {
cout << x << endl;
return 0;
} else if (a < b) {
cout << -1 << endl;
return 0;
}
}
return 0;
}