結果

問題 No.969 じゃんけん
ユーザー yakamotoyakamoto
提出日時 2020-01-17 21:22:14
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 290 ms / 2,000 ms
コード長 1,149 bytes
コンパイル時間 14,809 ms
コンパイル使用メモリ 428,360 KB
実行使用メモリ 52,968 KB
最終ジャッジ日時 2023-09-08 01:19:39
合計ジャッジ時間 17,777 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 289 ms
52,724 KB
testcase_01 AC 288 ms
52,968 KB
testcase_02 AC 283 ms
52,832 KB
testcase_03 AC 285 ms
52,792 KB
testcase_04 AC 284 ms
52,944 KB
testcase_05 AC 290 ms
52,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.lang.Exception
import kotlin.math.max
import kotlin.math.min

val MOD = 1_000_000_007

fun main() {
  val (X) = readInts()
  val ans = when(X) {
    0 -> true
    2 -> false
    4 -> true
    5 -> false
    7 -> false
    10 -> true
    else -> throw Exception()
  }
  if (ans) println("Yes") else println("No")
}












































private val isDebug = try {
  // なんか本番でエラーでる
  System.getenv("MY_DEBUG") != null
} catch (t: Throwable) {
  false
}

private fun readLn() = readLine()!!
private fun readStrings() = readLn().split(" ")
private fun readInts() = readStrings().map { it.toInt() }.toIntArray()
private fun readLongs() = readStrings().map { it.toLong() }.toLongArray()
private inline fun debug(msg: () -> String) {
  if (isDebug) System.err.println(msg())
}
private fun debug(a: LongArray) {
  debug{a.joinToString(" ")}
}
private fun debug(a: IntArray) {
  debug{a.joinToString(" ")}
}
private fun debug(a: BooleanArray) {
  debug{a.map{if(it) 1 else 0}.joinToString("")}
}
private fun debugDim(A: Array<IntArray>) {
  if (isDebug) {
    for (a in A) {
      debug(a)
    }
  }
}
0