結果

問題 No.264 じゃんけん
ユーザー Akihisa.K
提出日時 2018-11-03 14:52:30
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 428 bytes
コンパイル時間 309 ms
コンパイル使用メモリ 27,520 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-20 18:56:36
合計ジャッジ時間 885 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
#include<string.h>

int main(void){
    int n,k,tmp=0;
    char rslt[5];

    scanf("%d %d",&n,&k);
    tmp=n-k;

    if(tmp==0){
        strcpy(rslt,"Drew");
    }else if(tmp==1){
        strcpy(rslt,"Lost");
    }else if(tmp==-1){
        strcpy(rslt,"Won");
    }else if(tmp==2){
        strcpy(rslt,"Won");
    }else if(tmp==-2){
        strcpy(rslt,"Lost");
    }

    printf("%s\n",rslt);
    return 0;
}
0