結果
| 問題 |
No.894 二種類のバス
|
| コンテスト | |
| ユーザー |
💕💖💞
|
| 提出日時 | 2019-10-14 18:06:54 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 37 ms / 1,000 ms |
| コード長 | 256 bytes |
| コンパイル時間 | 94 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-24 06:30:35 |
| 合計ジャッジ時間 | 1,675 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)
💕💖💞