結果
| 問題 |
No.264 じゃんけん
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-01-23 17:14:26 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 619 bytes |
| コンパイル時間 | 114 ms |
| コンパイル使用メモリ | 27,008 KB |
| 最終ジャッジ日時 | 2025-02-10 06:29:02 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 2 |
コンパイルメッセージ
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",&me,&enemy);
| ~~~~~^~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
int me;
int enemy;
scanf("%d%d",&me,&enemy);
if(me==0){
if(enemy==0){
printf("Drew");
}else if(enemy==1){
printf("Won");
}else{
printf("Lost");
}
}else if(me==1){
if(enemy==0){
printf("Won");
}else if(enemy==1){
printf("Drew");
}else{
printf("Lost");
}
} else{
if(enemy==0){
printf("Won");
}else if(enemy==1){
printf("Lost");
}else{
printf("Drew");
}
}
}