結果
問題 |
No.264 じゃんけん
|
ユーザー |
![]() |
提出日時 | 2016-01-31 11:18:06 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 451 bytes |
コンパイル時間 | 154 ms |
コンパイル使用メモリ | 20,224 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-21 19:38:00 |
合計ジャッジ時間 | 703 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 WA * 6 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d %d",&n,&k); | ^~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> int main(void) { int n,k; scanf("%d %d",&n,&k); if(n==k){ printf("Drew\n"); } else if(n==0){//自分がグーを出す if(k==1){printf("WON\n");} if(k==2){printf("LOST\n");} } else if(n==1){//自分がチョキを出す if(k==2){printf("WON\n");} if(k==0){printf("LOST\n");} } else{//自分がパーを出す if(k==0){printf("WON\n");} if(k==1){printf("LOST\n");} } return 0; }