結果

問題 No.1486 ロボット
ユーザー dangodango
提出日時 2023-06-25 14:42:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 116 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 86,912 KB
実行使用メモリ 75,664 KB
最終ジャッジ日時 2023-09-15 09:12:26
合計ジャッジ時間 3,560 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,044 KB
testcase_01 AC 73 ms
71,104 KB
testcase_02 AC 73 ms
71,168 KB
testcase_03 AC 73 ms
71,256 KB
testcase_04 AC 76 ms
71,088 KB
testcase_05 AC 73 ms
71,204 KB
testcase_06 AC 105 ms
75,596 KB
testcase_07 AC 105 ms
75,272 KB
testcase_08 AC 90 ms
75,276 KB
testcase_09 AC 81 ms
75,476 KB
testcase_10 AC 115 ms
75,548 KB
testcase_11 AC 116 ms
75,268 KB
testcase_12 AC 93 ms
75,552 KB
testcase_13 AC 84 ms
75,516 KB
testcase_14 AC 90 ms
75,480 KB
testcase_15 AC 81 ms
75,488 KB
testcase_16 AC 81 ms
75,640 KB
testcase_17 AC 84 ms
75,664 KB
testcase_18 AC 87 ms
75,664 KB
testcase_19 AC 83 ms
75,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    A, B, C, D, E = map(int, input().split())
    dur = (A + B) * (C + D)
    num = E // dur
    rem = E % dur
    n = calc(A, B, C, D, dur) * num
    n += calc(A, B, C, D, rem)
    print(n)
def calc(A, B, C, D, E):
    n = 0
    for t in range(E):
        if t % (A + B) < A and t % (C + D) < C:
            n += 1
    return n
main()
0