結果

問題 No.481 1から10
ユーザー r2en_
提出日時 2017-02-27 14:28:16
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 241 bytes
コンパイル時間 533 ms
コンパイル使用メモリ 54,368 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-11 19:23:44
合計ジャッジ時間 854 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7 WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:11:13: warning: ‘res’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   11 |     cout << res ;
      |             ^~~

ソースコード

diff #

#include <iostream>
using namespace std;

int main(void){
    int i,res;
    int num[9];
    for(i=0;i<9;i++){
        cin >> num[i];
        if(num[i] != i+1){ res = i + 1; break;}
    }
    cout << res ;
    cout << "\n";
    return (0);
}
0