結果

問題 No.264 じゃんけん
ユーザー mentaikopasutamentaikopasuta
提出日時 2015-08-17 23:56:54
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 756 bytes
コンパイル時間 2,375 ms
コンパイル使用メモリ 71,732 KB
実行使用メモリ 57,784 KB
最終ジャッジ日時 2023-09-25 12:41:38
合計ジャッジ時間 3,934 ms
ジャッジサーバーID
(参考情報)
judge15 / 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 #

import java.util.Scanner; 


class no264
{
	public static void main( String args[] )throws java.io.IOException 
	{
		int a, b;
		
		 System.out.println("0:グー 1:チョキ 2:パー");
		 Scanner jan = new Scanner(System.in);  

		 a = jan.nextByte();
		 b = jan.nextByte();
			
		if( a == 0 )
		{
			if( b == 0 ) System.out.println("draw");
			if( b == 1 ) System.out.println("won");
			if( b == 2 ) System.out.println("lost");
		}
		
		if( a == 1 )
		{
			if( b == 0 ) System.out.println("lost");
			if( b == 1 ) System.out.println("draw");
			if( b == 2 ) System.out.println("won");
		}
		
		if( a == 2 )
		{
			if( b == 0 ) System.out.println("won");
			if( b == 1 ) System.out.println("lost");
			if( b == 2 ) System.out.println("draw");
		}
		 
	}
}
0