結果

問題 No.1486 ロボット
ユーザー marroncastlemarroncastle
提出日時 2021-04-23 21:50:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 218 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 87,104 KB
実行使用メモリ 76,208 KB
最終ジャッジ日時 2023-09-17 12:05:00
合計ジャッジ時間 2,899 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,276 KB
testcase_01 AC 73 ms
71,396 KB
testcase_02 AC 73 ms
71,160 KB
testcase_03 AC 72 ms
71,396 KB
testcase_04 AC 73 ms
71,444 KB
testcase_05 AC 74 ms
71,048 KB
testcase_06 AC 86 ms
76,004 KB
testcase_07 AC 86 ms
76,040 KB
testcase_08 AC 80 ms
75,872 KB
testcase_09 AC 81 ms
75,868 KB
testcase_10 AC 89 ms
76,104 KB
testcase_11 AC 89 ms
76,208 KB
testcase_12 AC 88 ms
76,028 KB
testcase_13 AC 78 ms
76,140 KB
testcase_14 AC 86 ms
76,024 KB
testcase_15 AC 84 ms
76,180 KB
testcase_16 AC 85 ms
75,872 KB
testcase_17 AC 84 ms
76,204 KB
testcase_18 AC 87 ms
76,176 KB
testcase_19 AC 85 ms
76,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B, C, D, E = map(int, input().split())
cyc = (A+B)*(C+D)
cnt = cnt2 = 0
for i in range(cyc):
    if i%(A+B)<A and i%(C+D)<C:
        cnt += 1
    if i+1==E%cyc:
        cnt2 = cnt
ans = E//cyc*cnt + cnt2
print(ans)
0