結果
| 問題 |
No.1101 鼻水
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-03 21:27:52 |
| 言語 | Kotlin (2.1.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 896 bytes |
| コンパイル時間 | 12,685 ms |
| コンパイル使用メモリ | 437,320 KB |
| 実行使用メモリ | 54,500 KB |
| 最終ジャッジ日時 | 2024-09-16 21:45:34 |
| 合計ジャッジ時間 | 18,870 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 12 |
ソースコード
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()
}