結果
問題 |
No.431 死亡フラグ
|
ユーザー |
|
提出日時 | 2016-11-10 20:34:32 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 357 bytes |
コンパイル時間 | 433 ms |
コンパイル使用メモリ | 54,028 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-25 07:31:07 |
合計ジャッジ時間 | 904 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:7:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d%d%d%d",&D1,&D2,&D3,&S1); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <iostream> using namespace std; int main(void){ // Here your code ! int D1,D2,D3,S1; scanf("%d%d%d%d",&D1,&D2,&D3,&S1); if(S1 == 1){ printf("SURVIVED\n"); return 0; }else if( D1 + D2 + D3 >= 2){ printf("DEAD\n"); return 0; }else{ printf("SURVIVED\n"); return 0; } }