結果
問題 | No.481 1から10 |
ユーザー | Guest |
提出日時 | 2020-04-16 13:28:06 |
言語 | C++11 (gcc 13.3.0) |
結果 |
RE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 234 bytes |
コンパイル時間 | 834 ms |
コンパイル使用メモリ | 53,496 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-01 19:16:07 |
合計ジャッジ時間 | 2,718 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | AC * 1 RE * 7 |
コンパイルメッセージ
main.cpp: In function ‘int solve(int*, int)’: main.cpp:9:22: warning: control reaches end of non-void function [-Wreturn-type] 9 | solve(B, i + 1); | ~~~~~^~~~~~~~~~
ソースコード
#include<iostream> using namespace std; int solve(int B[9], int i) { if (B[i - 1] != i) { return i; } else { solve(B, i + 1); } } int main() { int B[9]; for (int i = 0;i < 9;i++) { cin >> B[i]; } cout << solve(B, 1); }