結果

問題 No.395 永遠の17歳
ユーザー takun0131
提出日時 2016-07-31 00:06:46
言語 C90
(gcc 12.3.0)
結果
RE  
実行時間 -
コード長 138 bytes
コンパイル時間 552 ms
コンパイル使用メモリ 19,328 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-06 21:25:59
合計ジャッジ時間 3,912 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 17
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:17: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘int’ [-Wformat=]
    5 |         scanf("%d",num);
      |                ~^  ~~~
      |                 |  |
      |                 |  int
      |                 int *
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |         scanf("%d",num);
      |         ^~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void) {
	int num;
	scanf("%d",num);
	if(num<8){
		printf("-1");
	}else{
		printf("%d",num-7);
	}
	return 0;
}
0