結果

問題 No.431 死亡フラグ
ユーザー nninjinn00
提出日時 2016-11-12 19:28:19
言語 C90
(gcc 12.3.0)
結果
RE  
実行時間 -
コード長 190 bytes
コンパイル時間 196 ms
コンパイル使用メモリ 19,968 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-25 21:27:51
合計ジャッジ時間 4,023 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
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%d%d%d", d1, d2, d3, s);
      |                ~^         ~~
      |                 |         |
      |                 int *     int
main.c:5:19: warning: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘int’ [-Wformat=]
    5 |         scanf("%d%d%d%d", d1, d2, d3, s);
      |                  ~^           ~~
      |                   |           |
      |                   int *       int
main.c:5:21: warning: format ‘%d’ expects argument of type ‘int *’, but argument 4 has type ‘int’ [-Wformat=]
    5 |         scanf("%d%d%d%d", d1, d2, d3, s);
      |                    ~^             ~~
      |                     |             |
      |                     int *         int
main.c:5:23: warning: format ‘%d’ expects argument of type ‘int *’, but argument 5 has type ‘int’ [-Wformat=]
    5 |         scanf("%d%d%d%d", d1, d2, d3, s);
      |                      ~^               ~
      |                       |               |
      |                       int *           int
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |         scanf("%d%d%d%d", d1, d2, d3, s);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void){
	int d1, d2, d3, s;
	scanf("%d%d%d%d", d1, d2, d3, s);

	if((s == 1) || ((d1+d2+d3) < 2))
		printf("SURVIVED\n");
	else
		printf("DEAD\n");

	return 0;
}
0