結果
問題 | No.431 死亡フラグ |
ユーザー |
![]() |
提出日時 | 2016-10-03 19:38:19 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 230 bytes |
コンパイル時間 | 364 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-21 15:20:36 |
合計ジャッジ時間 | 1,038 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d", &d); | ^~~~~~~~~~~~~~~ main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d", &s); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>int main() {int d, s, cnt = 0, i;for (i = 0; i < 3; i++) {scanf("%d", &d);if (d == 1) cnt++;}scanf("%d", &s);if (cnt >= 2 && s == 0) printf("DEAD\n");else printf("SURVIVED\n");return 0;}