結果
問題 |
No.481 1から10
|
ユーザー |
![]() |
提出日時 | 2017-10-25 00:01:14 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 263 bytes |
コンパイル時間 | 1,158 ms |
コンパイル使用メモリ | 158,064 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 17:57:10 |
合計ジャッジ時間 | 1,810 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:13:13: warning: ‘ans’ may be used uninitialized in this function [-Wmaybe-uninitialized] 13 | cout << ans << endl; | ^~~
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(void) { int tmp,ans; for(int i=1; i<=10; i++) { cin >> tmp; if (tmp == i) continue; ans = i; i++; } cout << ans << endl; return 0; }