結果

問題 No.2622 Dam
ユーザー 👑 timitimi
提出日時 2024-02-09 21:29:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 62 ms / 2,000 ms
コード長 239 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 67,852 KB
最終ジャッジ日時 2024-02-09 21:29:04
合計ジャッジ時間 956 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
53,332 KB
testcase_01 AC 62 ms
65,756 KB
testcase_02 AC 53 ms
65,756 KB
testcase_03 AC 55 ms
67,852 KB
testcase_04 AC 56 ms
67,852 KB
testcase_05 AC 54 ms
67,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T=int(input())
for _ in range(T):
  v,x,fo,fi,q,r=map(int, input().split())
  pl=(fi-fo)*r
  mi=-fo*(q-r)
  if pl+x>v:
    print('Overflow')
  elif pl+mi==0:
    print('Safe')
  elif pl+mi<0:
    print('Zero')
  else:
    print('Overflow')
0