結果

問題 No.2622 Dam
ユーザー bluemeganebluemegane
提出日時 2024-02-10 07:17:03
言語 C#
(.NET 8.0.203)
結果
WA  
実行時間 -
コード長 694 bytes
コンパイル時間 6,948 ms
コンパイル使用メモリ 157,484 KB
実行使用メモリ 178,164 KB
最終ジャッジ日時 2024-02-10 07:17:12
合計ジャッジ時間 8,226 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
31,012 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (114 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
  main -> /home/judge/data/code/bin/Release/net7.0/main.dll
  main -> /home/judge/data/code/bin/Release/net7.0/publish/

ソースコード

diff #

using System;

public class Hello
{
    static void Main()
    {
        var T = int.Parse(Console.ReadLine().Trim());
        while (T-- > 0)
        {
            string[] line = Console.ReadLine().Trim().Split(' ');
            var fo = int.Parse(line[2]);
            var fi = int.Parse(line[3]);
            var q = int.Parse(line[4]);
            var r = int.Parse(line[5]);
            getAns(fo, fi, q, r);
        }
    }
    static void getAns(int fo, int fi, int q, int r)
    {
        var fout = fo * q;
        var fin = fi * r;
        var ans = "Safe";
        if (fout > fin) ans = "Zero";
        else if (fout < fin) ans = "Overflow";
        Console.WriteLine(ans);
    }
}
0