結果
| 問題 | No.894 二種類のバス |
| コンテスト | |
| ユーザー |
lie_of_lillie
|
| 提出日時 | 2021-07-08 14:41:10 |
| 言語 | Python3 (3.14.3 + numpy 2.4.2 + scipy 1.17.0) |
| 結果 |
AC
|
| 実行時間 | 94 ms / 1,000 ms |
| コード長 | 255 bytes |
| 記録 | |
| コンパイル時間 | 542 ms |
| コンパイル使用メモリ | 20,696 KB |
| 実行使用メモリ | 15,508 KB |
| 最終ジャッジ日時 | 2026-03-22 13:37:16 |
| 合計ジャッジ時間 | 3,448 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
import math T, A, B = map(int,input().split()) m1 = T//A if T%A == 0 else T//A + 1 m2 = T//B if T%B == 0 else T//B + 1 #print(math.gcd(m1, m2)) common = A*B//math.gcd(A, B) m3 = T//common if T%common == 0 else T//common + 1 #print(m1 + m2) print(m1+m2-m3)
lie_of_lillie