結果
問題 | No.1486 ロボット |
ユーザー |
|
提出日時 | 2021-04-23 21:31:36 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 56 ms / 2,000 ms |
コード長 | 256 bytes |
コンパイル時間 | 177 ms |
コンパイル使用メモリ | 82,380 KB |
実行使用メモリ | 62,720 KB |
最終ジャッジ日時 | 2024-07-04 07:40:53 |
合計ジャッジ時間 | 1,802 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
a,b,c,d,e = map(int,input().split()) ma = (a+b)*(c+d) mul,left = divmod(e, ma) ans = 0 count = 0 for i in range(1,ma): if 0 < i%(a+b) <= a and 0 < i%(c+d) <= c: count += 1 if i == left: ans += count ans += count*mul print(ans)