結果

問題 No.1486 ロボット
ユーザー HAGI_TAROHAGI_TARO
提出日時 2021-08-31 22:38:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 401 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 87,200 KB
実行使用メモリ 76,124 KB
最終ジャッジ日時 2023-08-17 12:58:09
合計ジャッジ時間 4,023 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,368 KB
testcase_01 AC 72 ms
71,376 KB
testcase_02 AC 71 ms
71,256 KB
testcase_03 AC 72 ms
71,348 KB
testcase_04 AC 73 ms
71,324 KB
testcase_05 AC 70 ms
71,096 KB
testcase_06 AC 70 ms
71,460 KB
testcase_07 AC 85 ms
75,852 KB
testcase_08 AC 72 ms
71,296 KB
testcase_09 AC 76 ms
75,880 KB
testcase_10 AC 87 ms
76,124 KB
testcase_11 AC 89 ms
75,928 KB
testcase_12 AC 88 ms
75,928 KB
testcase_13 AC 81 ms
75,972 KB
testcase_14 AC 89 ms
75,708 KB
testcase_15 AC 87 ms
75,932 KB
testcase_16 AC 87 ms
76,084 KB
testcase_17 AC 85 ms
76,104 KB
testcase_18 AC 85 ms
75,836 KB
testcase_19 AC 82 ms
76,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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