結果

問題 No.264 じゃんけん
ユーザー PraiPrai
提出日時 2018-02-15 03:18:59
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 760 bytes
コンパイル時間 609 ms
コンパイル使用メモリ 28,160 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-25 10:55:50
合計ジャッジ時間 1,320 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
#include<stdlib.h>
#include<math.h>

int main(int argc, char const *argv[])
{
	int me,you;

	printf("1:グー 2:チョキ 3:パーから選んでください\n");
	printf("自分の手\n");
	scanf("%d",&me);
	printf("相手の手\n");
	scanf("%d",&you);


	switch(me){
	case 1:
		if(you==1){
			printf("Drew\n");
		}else if(you==2){
			printf("Won\n");
		}else if(you==3){
			printf("Lost\n");
		}
		break;

	case 2:
		if(you==1){
			printf("Lost\n");
		}else if(you==2){
			printf("Drew\n");
		}else if(you==3){
			printf("Won\n");
		}
		break;

	case 3:
		if(you==1){
			printf("Won\n");
		}else if(you==2){
			printf("Lost\n");
		}else if(you==3){
			printf("Drew\n");
		}
		break;

	default:
		printf("error\n");
		break;
	}

	return 0;
}
0