結果

問題 No.395 永遠の17歳
ユーザー yansi819
提出日時 2024-03-31 15:12:41
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 368 bytes
コンパイル時間 3,786 ms
コンパイル使用メモリ 250,732 KB
最終ジャッジ日時 2025-02-20 17:42:42
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0