結果
問題 | No.481 1から10 |
ユーザー | uudjjs |
提出日時 | 2017-04-24 18:05:34 |
言語 | C (gcc 12.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 188 bytes |
コンパイル時間 | 341 ms |
コンパイル使用メモリ | 27,436 KB |
実行使用メモリ | 10,320 KB |
最終ジャッジ日時 | 2023-10-11 13:17:21 |
合計ジャッジ時間 | 6,859 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | TLE | - |
testcase_01 | -- | - |
testcase_02 | -- | - |
testcase_03 | -- | - |
testcase_04 | -- | - |
testcase_05 | -- | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
コンパイルメッセージ
main.c: 関数 ‘main’ 内: main.c:9:25: 警告: 関数 ‘printf’ の暗黙的な宣言です [-Wimplicit-function-declaration] 9 | printf("%d", array[i] + 1); | ^~~~~~ main.c:1:1: 備考: include ‘<stdio.h>’ or provide a declaration of ‘printf’ +++ |+#include <stdio.h> 1 | int main(void) { main.c:9:25: 警告: 組み込み関数 ‘printf’ の互換性がない暗黙的な宣言です [-Wbuiltin-declaration-mismatch] 9 | printf("%d", array[i] + 1); | ^~~~~~ main.c:9:25: 備考: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:8:26: 警告: iteration 8 invokes undefined behavior [-Waggressive-loop-optimizations] 8 | if (array[i+1] - array[i] == 2) | ~~~~~^~~~~ main.c:6:22: 備考: within this loop 6 | for (i = 0;i <= 8;i++) { | ~~^~~~
ソースコード
int main(void) { int array[9] = { 1,2,3,4,6,7,8,9,10 }; int i; for (i = 0;i <= 8;i++) { if (array[i+1] - array[i] == 2) printf("%d", array[i] + 1); } while (1); return 0; }