結果
問題 | No.894 二種類のバス |
ユーザー |
![]() |
提出日時 | 2020-03-20 23:31:35 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 22 ms / 1,000 ms |
コード長 | 127 bytes |
コンパイル時間 | 223 ms |
コンパイル使用メモリ | 7,076 KB |
実行使用メモリ | 8,192 KB |
最終ジャッジ日時 | 2024-12-15 19:05:30 |
合計ジャッジ時間 | 1,819 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
from fractions import gcd T,A,B = [int(x) for x in raw_input().split()] T -= 1; AB=A*B/gcd(A,B); print(T/A + T/B - T/AB + 1)