結果

問題 No.734 Careful Engineer
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2018-11-26 22:40:33
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 58 ms / 2,000 ms
コード長 880 bytes
コンパイル時間 807 ms
コンパイル使用メモリ 61,196 KB
実行使用メモリ 22,848 KB
最終ジャッジ日時 2023-09-02 09:18:06
合計ジャッジ時間 2,603 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
20,760 KB
testcase_01 AC 57 ms
20,856 KB
testcase_02 AC 57 ms
22,728 KB
testcase_03 AC 57 ms
20,644 KB
testcase_04 AC 58 ms
20,732 KB
testcase_05 AC 57 ms
20,716 KB
testcase_06 AC 56 ms
18,692 KB
testcase_07 AC 57 ms
20,664 KB
testcase_08 AC 57 ms
20,672 KB
testcase_09 AC 57 ms
22,708 KB
testcase_10 AC 56 ms
22,672 KB
testcase_11 AC 57 ms
22,848 KB
testcase_12 AC 56 ms
20,644 KB
testcase_13 AC 57 ms
20,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System.Collections.Generic;
using System.Linq;
using static System.Console;

class Program {
    static void Main() {
        var hand = NextInt() * 60L;
        var runCost = NextInt();
        var initCost = NextInt() * 3600L;

        if (hand <= runCost) {
            WriteLine(-1);
            return;
        }
        WriteLine((initCost - 1) / (hand - runCost) + 1);
    }

    static int NextInt() {
        return int.Parse(NextString());
    }

    static string NextString() {
        var result = new List<char>();
        while (true) {
            int next = Read();
            if (next < 0)
                break;
            var nextChar = (char)next;
            if (!char.IsWhiteSpace(nextChar))
                result.Add(nextChar);
            else if (nextChar != '\r')
                break;
        }
        return string.Join("", result);
    }
}
0