結果
| 問題 | No.1047 Zero (Novice) |
| コンテスト | |
| ユーザー |
rutilicus
|
| 提出日時 | 2021-02-21 23:25:59 |
| 言語 | Kotlin (2.4.10) |
| 結果 |
AC
|
| 実行時間 | 182 ms / 2,000 ms |
| + 891µs | |
| コード長 | 397 bytes |
| 記録 | |
| コンパイル時間 | 10,795 ms |
| コンパイル使用メモリ | 505,228 KB |
| 実行使用メモリ | 55,724 KB |
| 最終ジャッジ日時 | 2026-08-31 08:04:58 |
| 合計ジャッジ時間 | 17,031 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
fun main() {
val builder = StringBuilder()
val (a, b) = readInputLine().split(" ").map { it.toLong() }
if (b == 0L) {
builder.appendLine(1)
} else {
builder.appendLine(
when(a) {
-1L -> 2
else -> -1
}
)
}
print(builder.toString())
}
fun readInputLine(): String {
return readLine()!!
}
rutilicus