結果

問題 No.481 1から10
ユーザー tenman
提出日時 2017-09-04 18:28:54
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 286 bytes
コンパイル時間 421 ms
コンパイル使用メモリ 55,744 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-06 20:55:38
合計ジャッジ時間 948 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main() {
  // 入力
  int a[9];
  for (int i = 0; i < 9; i++) cin >> a[i];

  int ans = -1;
  for (int i = 0; i < 8; i++) {
    if (a[i+1] - a[i] == 2) ans = i + 2;
  }

  // 解答
  cout << (ans == -1 ? 10 : ans) << endl;

  return 0;
}
0