結果

問題 No.1486 ロボット
ユーザー ああいいああいい
提出日時 2022-03-15 22:58:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 288 bytes
コンパイル時間 695 ms
コンパイル使用メモリ 81,584 KB
実行使用メモリ 63,692 KB
最終ジャッジ日時 2023-10-23 21:55:49
合計ジャッジ時間 2,008 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,344 KB
testcase_01 AC 36 ms
53,344 KB
testcase_02 AC 36 ms
53,344 KB
testcase_03 AC 36 ms
53,344 KB
testcase_04 AC 35 ms
53,344 KB
testcase_05 AC 37 ms
53,344 KB
testcase_06 AC 51 ms
61,480 KB
testcase_07 AC 54 ms
61,480 KB
testcase_08 AC 46 ms
59,420 KB
testcase_09 AC 43 ms
59,420 KB
testcase_10 AC 61 ms
63,692 KB
testcase_11 AC 61 ms
63,692 KB
testcase_12 AC 54 ms
63,680 KB
testcase_13 AC 44 ms
59,416 KB
testcase_14 AC 53 ms
63,680 KB
testcase_15 AC 51 ms
63,676 KB
testcase_16 AC 48 ms
61,628 KB
testcase_17 AC 52 ms
63,684 KB
testcase_18 AC 53 ms
63,680 KB
testcase_19 AC 50 ms
63,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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