結果

問題 No.2622 Dam
ユーザー ゼット
提出日時 2024-02-09 21:40:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 57 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 131 ms
コンパイル使用メモリ 82,008 KB
実行使用メモリ 67,592 KB
最終ジャッジ日時 2024-09-28 14:55:21
合計ジャッジ時間 822 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

Q=int(input())
for _ in range(Q):
  V,X,f1,f2,q,r=map(int,input().split())
  if f1>=f2:
    print('Zero')
    continue
  if X+(f2-f1)*r>V:
    print('Overflow')
    continue
  tin=r*f2
  tout=q*f1
  if tin>tout:
    print('Overflow')
  elif tin<tout:
    print('Zero')
  else:
    print('Safe')
  
0