結果

問題 No.1486 ロボット
ユーザー convexineq
提出日時 2021-04-23 21:30:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 54 ms / 2,000 ms
コード長 242 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 61,824 KB
最終ジャッジ日時 2024-07-04 07:40:17
合計ジャッジ時間 1,725 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c,d,e = map(int,input().split())
T = (a+b)*(c+d)
q,r = divmod(e,T)
ans = 0
for i in range(T):
    if i%(a+b) < a and i%(c+d) < c:
        ans += 1
ans *= q
for i in range(r):
    if i%(a+b) < a and i%(c+d) < c:
        ans += 1
print(ans)
0