結果

問題 No.46 はじめのn歩
ユーザー vjudge1
提出日時 2025-06-13 17:06:51
言語 Crystal
(1.14.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 475 bytes
コンパイル時間 15,861 ms
コンパイル使用メモリ 307,164 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-06-13 17:07:08
合計ジャッジ時間 12,784 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

lib C
    fun getchar_unlocked : Int32
    fun isspace(c: Int32): Bool
end
fun read_int: Int32
    ans = 0
    f = 1
    c = C.getchar_unlocked()
    while C.isspace(c)
        c = C.getchar_unlocked()
    end
    if c == 45
        f = -1
        c = C.getchar_unlocked()
    end
    while (48 .. 57).includes?(c)
        ans = (ans << 1) + (ans << 3) + (c ^ 48)
        c = C.getchar_unlocked()
    end
    return ans * f
end
a = read_int
b = read_int
puts (b + a - 1) // a
0