結果
| 問題 |
No.894 二種類のバス
|
| コンテスト | |
| ユーザー |
tanimani364
|
| 提出日時 | 2021-03-29 18:17:28 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 440 bytes |
| コンパイル時間 | 281 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 66,048 KB |
| 最終ジャッジ日時 | 2024-11-29 10:35:50 |
| 合計ジャッジ時間 | 2,075 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 6 |
ソースコード
#!/usr/bin/env python3 #coding:utf-8 import math import string import random import heapq from sys import stdin # import numpy as np # from matplotlib import pyplot as plt def gcd(a,b): while b>0: t=a a=b b=t%b return a def lcm(a,b): return a/gcd(a,b)*b def main(): read=stdin.readline #edit here! t,a,b=map(int,read().split()) ans=(t-1)//a+(t-1)//b+1-(t-1)//lcm(a,b) print(int(ans)) if __name__ == '__main__': main()
tanimani364