結果
| 問題 |
No.1004 サイコロの実装 (2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-06 21:32:08 |
| 言語 | Kotlin (2.1.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 895 bytes |
| コンパイル時間 | 13,535 ms |
| コンパイル使用メモリ | 433,136 KB |
| 実行使用メモリ | 51,188 KB |
| 最終ジャッジ日時 | 2024-10-14 04:20:27 |
| 合計ジャッジ時間 | 27,881 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 WA * 32 |
コンパイルメッセージ
Main.kt:7:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
^
Main.kt:9:9: warning: variable 'a' is never used
val a = sc.nextLong()
^
Main.kt:10:9: warning: variable 'b' is never used
val b = sc.nextLong()
^
ソースコード
import java.io.BufferedReader
import java.io.InputStream
import java.io.InputStreamReader
import java.lang.StringBuilder
import java.util.*
fun main(args: Array<String>) {
val sc = FastScanner(System.`in`)
val a = sc.nextLong()
val b = sc.nextLong()
val x0 = sc.nextLong()
val n = sc.nextLong()
if (x0 % 2 == 0L) {
println("%d %d".format(n / 2, 0))
} else {
println("%d %d".format(0, n / 2))
}
}
class FastScanner(s: InputStream) {
private var st = StringTokenizer("")
private val br = BufferedReader(InputStreamReader(s))
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()
fun ready() = br.ready()
}