結果

問題 No.481 1から10
ユーザー uudjjs
提出日時 2017-04-24 18:20:07
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
RE  
実行時間 -
コード長 233 bytes
コンパイル時間 241 ms
コンパイル使用メモリ 22,272 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-13 12:03:17
合計ジャッジ時間 2,277 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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]);
      |                 ~~~~~^~~~~~~~~~~~~~~~~

ソースコード

diff #

#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;
}
0