結果

問題 No.2044 Infinite Nim
ユーザー 👑 箱星箱星
提出日時 2022-05-05 22:57:23
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 499 ms / 2,000 ms
コード長 922 bytes
コンパイル時間 12,793 ms
コンパイル使用メモリ 439,236 KB
実行使用メモリ 67,996 KB
最終ジャッジ日時 2024-04-17 11:58:28
合計ジャッジ時間 30,045 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 323 ms
53,552 KB
testcase_01 AC 320 ms
53,632 KB
testcase_02 AC 322 ms
53,620 KB
testcase_03 AC 326 ms
53,500 KB
testcase_04 AC 324 ms
53,584 KB
testcase_05 AC 325 ms
53,588 KB
testcase_06 AC 325 ms
53,636 KB
testcase_07 AC 323 ms
53,596 KB
testcase_08 AC 329 ms
53,516 KB
testcase_09 AC 328 ms
53,660 KB
testcase_10 AC 319 ms
53,612 KB
testcase_11 AC 324 ms
53,596 KB
testcase_12 AC 326 ms
53,720 KB
testcase_13 AC 494 ms
60,544 KB
testcase_14 AC 479 ms
57,840 KB
testcase_15 AC 454 ms
56,984 KB
testcase_16 AC 478 ms
57,636 KB
testcase_17 AC 494 ms
62,652 KB
testcase_18 AC 454 ms
56,888 KB
testcase_19 AC 461 ms
57,448 KB
testcase_20 AC 483 ms
59,708 KB
testcase_21 AC 495 ms
63,352 KB
testcase_22 AC 468 ms
60,092 KB
testcase_23 AC 480 ms
58,240 KB
testcase_24 AC 499 ms
61,968 KB
testcase_25 AC 487 ms
59,312 KB
testcase_26 AC 475 ms
62,140 KB
testcase_27 AC 476 ms
57,272 KB
testcase_28 AC 481 ms
64,144 KB
testcase_29 AC 489 ms
60,260 KB
testcase_30 AC 469 ms
61,080 KB
testcase_31 AC 479 ms
64,296 KB
testcase_32 AC 494 ms
64,644 KB
testcase_33 AC 486 ms
64,168 KB
testcase_34 AC 481 ms
60,956 KB
testcase_35 AC 482 ms
67,996 KB
testcase_36 AC 317 ms
53,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.PrintWriter
import java.time.LocalDateTime
import java.util.*
import kotlin.math.*

fun PrintWriter.solve() {
    val n = nextInt()
    val a = Array(n) { nextInt() }
    println(if (a.reduce(Int::xor) != 0) "First" else "Second")
}

fun main() {
    Thread(null, {
        val writer = PrintWriter(System.out, false)
        writer.solve()
        writer.flush()
    }, "solve", abs(1L.shl(26)))
        .apply { setUncaughtExceptionHandler { _, e -> e.printStackTrace(); kotlin.system.exitProcess(1) } }
        .apply { start() }.join()
}

// region Scanner
private var st = StringTokenizer("")
private val br = System.`in`.bufferedReader()

fun next(): String {
    while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine())
    return st.nextToken()
}

fun nextInt() = next().toInt()
fun nextLong() = next().toLong()
fun nextLine() = br.readLine()
fun nextDouble() = next().toDouble()
// endregion
0