結果

問題 No.264 じゃんけん
ユーザー uchida_tuchida_t
提出日時 2023-04-13 12:43:43
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 255 ms / 5,000 ms
コード長 449 bytes
コンパイル時間 10,312 ms
コンパイル使用メモリ 430,800 KB
実行使用メモリ 57,000 KB
最終ジャッジ日時 2024-04-17 16:52:19
合計ジャッジ時間 13,354 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 248 ms
57,000 KB
testcase_01 AC 248 ms
56,992 KB
testcase_02 AC 249 ms
56,876 KB
testcase_03 AC 250 ms
56,844 KB
testcase_04 AC 248 ms
56,856 KB
testcase_05 AC 255 ms
56,988 KB
testcase_06 AC 255 ms
56,988 KB
testcase_07 AC 245 ms
56,852 KB
testcase_08 AC 252 ms
56,956 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>){
         ^

ソースコード

diff #

fun main(args: Array<String>){
	var (me ,enemy)=readLine()!!.split(" ").map(String::toInt)
	if (me == 0) {
		when(enemy) {
			0 -> println("Drew")
			1 -> println("Won")
			2 -> println("Lost")
		}
	} else if (me == 1) {
		when(enemy) {
			0 -> println("Lost")
			1 -> println("Drew")
			2 -> println("Won")
		}
	} else if (me == 2){
			when(enemy) {
			0 -> println("Won")
			1 -> println("Lost")
			2 -> println("Drew")
		}
	} else {
		return
	}
}
0