結果

問題 No.1101 鼻水
ユーザー 👑 箱星箱星
提出日時 2020-07-03 21:27:52
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 896 bytes
コンパイル時間 15,744 ms
コンパイル使用メモリ 410,052 KB
実行使用メモリ 52,248 KB
最終ジャッジ日時 2023-10-15 04:15:47
合計ジャッジ時間 25,037 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 281 ms
50,436 KB
testcase_01 AC 281 ms
50,384 KB
testcase_02 AC 278 ms
50,320 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 280 ms
50,420 KB
testcase_07 WA -
testcase_08 AC 284 ms
50,256 KB
testcase_09 WA -
testcase_10 AC 287 ms
50,636 KB
testcase_11 WA -
testcase_12 AC 285 ms
50,400 KB
testcase_13 WA -
testcase_14 AC 283 ms
50,384 KB
testcase_15 WA -
testcase_16 AC 285 ms
50,220 KB
testcase_17 WA -
testcase_18 AC 283 ms
50,452 KB
testcase_19 WA -
testcase_20 AC 290 ms
50,136 KB
testcase_21 WA -
testcase_22 AC 282 ms
50,308 KB
testcase_23 WA -
testcase_24 AC 283 ms
50,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader
import java.io.InputStream
import java.io.InputStreamReader
import java.io.PrintWriter
import java.util.*

fun PrintWriter.solve(sc: FastScanner) {
    val v = sc.nextLong()
    val t = sc.nextLong()
    val p = sc.nextLong()
    val x = v + p * v
    println(x + (x + t - 1) / (t - 1))
}

fun main() {
    val writer = PrintWriter(System.out, false)
    writer.solve(FastScanner(System.`in`))
    writer.flush()
}

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()
}
0