結果
| 問題 | No.894 二種類のバス |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-27 21:35:18 |
| 言語 | Kotlin (2.3.20) |
| 結果 |
AC
|
| 実行時間 | 191 ms / 1,000 ms |
| コード長 | 602 bytes |
| 記録 | |
| コンパイル時間 | 9,833 ms |
| コンパイル使用メモリ | 470,140 KB |
| 実行使用メモリ | 53,240 KB |
| 最終ジャッジ日時 | 2026-04-12 00:01:05 |
| 合計ジャッジ時間 | 15,692 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
import java.io.PrintWriter
import java.math.BigInteger
val cout = PrintWriter(System.out)
fun readLn() = readLine()!!
fun readInt() = readLn().toInt()
fun readLong() = readLn().toInt()
fun readDouble() = readLn().toDouble()
fun readStrings() = readLn().split(" ")
fun readInts() = readStrings().map { it.toInt() }
fun readLongs() = readStrings().map { it.toLong() }
fun readDoubles() = readStrings().map { it.toDouble() }
fun main(args: Array<String>) {
var (t, a, b) = readStrings().map { it.toBigInteger() }
t -= BigInteger.ONE
println(t/a + t/b - t/(a*b/a.gcd(b))+ BigInteger.ONE)
}