結果

問題 No.734 Careful Engineer
コンテスト
ユーザー tanson
提出日時 2025-11-17 00:14:13
言語 Standard ML
(MLton 20210117)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 618 bytes
コンパイル時間 3,543 ms
コンパイル使用メモリ 688,120 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-11-17 00:14:17
合計ジャッジ時間 4,367 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

fun readLargeInt () =
    valOf (TextIO.scanStream (LargeInt.scan StringCvt.DEC) TextIO.stdIn)


fun largeIntString n =
    if 0 <= n
    then LargeInt.toString n
    else "-" ^ LargeInt.toString (abs n)


val () =
    let
        val a = readLargeInt ()
        val b = readLargeInt ()
        val c = readLargeInt ()
       
        val ans =
            if 60 * a <= b then ~1
            else
                ( if c * 60 * 60 mod (60 * a - b) = 0
                  then c * 60 * 60 div (60 * a - b)
                  else c * 60 * 60 div (60 * a - b) + 1 )
    in
        print (largeIntString ans ^ "\n")
    end
0