結果
問題 |
No.264 じゃんけん
|
ユーザー |
![]() |
提出日時 | 2018-02-25 13:58:12 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 285 bytes |
コンパイル時間 | 198 ms |
コンパイル使用メモリ | 29,568 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-08 10:51:15 |
合計ジャッジ時間 | 683 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 3 |
コンパイルメッセージ
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,&k); | ~~~~~^~~~~~~~~~~~~~
ソースコード
#include <cstdio> #include <cmath> using namespace std; int main(){ int n,k; scanf("%d%d",&n,&k); if((n==0&&k==1)||(n==1&&k==2)||(n==2&&k==0)){ printf("Win"); } else if((n==0&&k==2)||(n==1&&k==0)||(n==2&&k==1)){ printf("Lost"); } else{ printf("Drew"); } return 0; }