結果
問題 | No.2622 Dam |
ユーザー |
👑 |
提出日時 | 2024-01-01 23:50:32 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 562 bytes |
コンパイル時間 | 168 ms |
コンパイル使用メモリ | 82,368 KB |
実行使用メモリ | 77,820 KB |
最終ジャッジ日時 | 2024-09-27 17:36:57 |
合計ジャッジ時間 | 1,243 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 1 |
other | RE * 5 |
ソースコード
def solve():V, X, F_out, F_in, Q, R = map(int, input().split())assert 1 <= X <= V <= 10**18assert 1 <= F_out <= 10**9assert 1 <= F_in <= 10**9assert 1 <= R < Q <= 10**9F_sunny, F_rainy = - F_out, F_in - F_outif X + R * F_rainy >= V:print("Overflow")returndiff = R * F_rainy + (Q - R) * F_sunnyif diff < 0:print("Zero")elif diff > 0:print("Overflow")else:print("Safe")T = int(input())assert 1 <= T <= 1000for _ in range(T+1):solve()