結果

問題 No.810 割った余りの個数
ユーザー むらため
提出日時 2019-05-05 14:27:08
言語 Nim
(2.2.0)
結果
WA  
実行時間 -
コード長 300 bytes
コンパイル時間 2,265 ms
コンパイル使用メモリ 61,244 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-01 23:25:38
合計ジャッジ時間 3,117 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 WA * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "<stdio.h>" ,discardable.}
proc scan(): int =
  while true:
    let k = getchar_unlocked()
    if k < '0': return
    result = 10 * result + k.ord - '0'.ord

let l = scan()
let r = scan()
let m = scan()
echo 1 + ((r - l + 1) mod m)

0