結果

問題 No.523 LED
ユーザー むらためむらため
提出日時 2019-01-25 12:01:57
言語 Nim
(2.2.0)
結果
WA  
実行時間 -
コード長 472 bytes
コンパイル時間 3,727 ms
コンパイル使用メモリ 60,808 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-01 10:44:56
合計ジャッジ時間 4,523 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

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

const MOD = 1000000007
const results = (proc ():seq[int] =
  result = newSeq[int]()
  var ans = 1
  for i in 1..5_000_000:
    let m = (i * (2 * i - 1)) mod MOD
    ans = ( ans * m ) mod MOD
  result &= ans
)()
let n = scan()
echo results[0]
# echo results[n]
0