結果
問題 | No.523 LED |
ユーザー |
|
提出日時 | 2019-01-25 11:46:38 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 119 ms / 2,000 ms |
コード長 | 406 bytes |
コンパイル時間 | 2,273 ms |
コンパイル使用メモリ | 60,960 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-01 10:42:38 |
合計ジャッジ時間 | 3,757 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
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 var n = scan() var ans = 1 while n > 0: ans = ans * n if ans >= MOD : ans = ans mod MOD ans = ans * (2 * n - 1) if ans >= MOD : ans = ans mod MOD n -= 1 echo ans