結果
| 問題 | No.894 二種類のバス |
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-01-27 00:24:57 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 99 ms / 1,000 ms |
| コード長 | 249 bytes |
| 記録 | |
| コンパイル時間 | 415 ms |
| コンパイル使用メモリ | 20,568 KB |
| 実行使用メモリ | 15,356 KB |
| 最終ジャッジ日時 | 2026-04-04 12:20:37 |
| 合計ジャッジ時間 | 3,169 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines from math import gcd T,A,B = map(int,read().split()) L = A*B//gcd(A,B) T -= 1 answer = (T//A) + (T//B) - (T//L) + 1 print(answer)
maspy