結果

問題 No.1486 ロボット
ユーザー O2MT
提出日時 2021-05-06 00:45:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 218 bytes
コンパイル時間 484 ms
コンパイル使用メモリ 81,964 KB
実行使用メモリ 52,480 KB
最終ジャッジ日時 2024-09-13 17:15:45
合計ジャッジ時間 2,123 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 4 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd
A,B,C,D,E = map(int,input().split())
time,count = 1,1
F = gcd((A+B),(C+D))
while time < min(E,F):
  if 0 <= time%(A+B) < A and 0 <= time%(C+D) < C:
    count += 1
  time += 1
print(count*(E//time))
0