結果
問題 |
No.481 1から10
|
ユーザー |
![]() |
提出日時 | 2017-04-24 18:20:04 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 233 bytes |
コンパイル時間 | 113 ms |
コンパイル使用メモリ | 22,400 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 12:03:15 |
合計ジャッジ時間 | 2,340 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | RE * 8 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:7:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d", &array[j]); | ~~~~~^~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> int main(void) { int array[9]; int j; for (j = 0;j < 9;j++) { scanf("%d", &array[j]); } int i; for (i = 0;i <= 8;i++) { if (array[i+1] - array[i] == 2) printf("%d\n", array[i] + 1); } return 0; }