結果
問題 | No.1713 trick or treat! |
ユーザー | 👑 箱 |
提出日時 | 2021-10-22 21:20:47 |
言語 | Kotlin (1.9.10) |
結果 |
AC
|
実行時間 | 298 ms / 2,000 ms |
コード長 | 865 bytes |
コンパイル時間 | 14,088 ms |
コンパイル使用メモリ | 438,172 KB |
実行使用メモリ | 54,016 KB |
最終ジャッジ日時 | 2023-10-24 12:05:45 |
合計ジャッジ時間 | 17,510 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 286 ms
53,996 KB |
testcase_01 | AC | 294 ms
54,012 KB |
testcase_02 | AC | 292 ms
53,996 KB |
testcase_03 | AC | 298 ms
54,016 KB |
testcase_04 | AC | 294 ms
54,008 KB |
testcase_05 | AC | 293 ms
53,996 KB |
testcase_06 | AC | 292 ms
53,988 KB |
testcase_07 | AC | 289 ms
53,988 KB |
ソースコード
import java.io.PrintWriter import java.util.* import kotlin.math.* fun PrintWriter.solve() { val n = nextInt() val m = nextInt() println((1 .. (n or m)).fold(1L, Long::times)) } 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