結果
問題 | No.969 じゃんけん |
ユーザー |
![]() |
提出日時 | 2020-01-17 21:22:14 |
言語 | Kotlin (2.1.0) |
結果 |
AC
|
実行時間 | 323 ms / 2,000 ms |
コード長 | 1,149 bytes |
コンパイル時間 | 14,703 ms |
コンパイル使用メモリ | 439,376 KB |
実行使用メモリ | 57,228 KB |
最終ジャッジ日時 | 2024-06-25 18:24:16 |
合計ジャッジ時間 | 17,788 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 4 |
ソースコード
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) } } }