結果
問題 | No.264 じゃんけん |
ユーザー |
![]() |
提出日時 | 2018-02-25 14:02:48 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 311 bytes |
コンパイル時間 | 447 ms |
コンパイル使用メモリ | 29,568 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-08 11:03:21 |
合計ジャッジ時間 | 697 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d%d\n",&n,&k); | ~~~~~^~~~~~~~~~~~~~~~
ソースコード
#include <cstdio> #include <cmath> using namespace std; int main(){ int n,k; scanf("%d%d\n",&n,&k); if((n==0&&k==1)||(n==1&&k==2)||(n==2&&k==0)){ printf("Won\n"); } else if((n==0&&k==2)||(n==1&&k==0)||(n==2&&k==1)){ printf("Lost"); } else if(n==k){ printf("Drew"); } else{ } return 0; }