結果
問題 | No.523 LED |
ユーザー |
|
提出日時 | 2017-06-02 22:34:46 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 91 ms / 2,000 ms |
コード長 | 654 bytes |
コンパイル時間 | 951 ms |
コンパイル使用メモリ | 116,180 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 19:43:28 |
合計ジャッジ時間 | 2,350 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
import std.stdio, std.string, std.conv, std.range, std.array, std.algorithm;import std.uni, std.math, std.container, std.typecons, std.typetuple;import core.bitop, std.datetime;immutable long mod = 10^^9 + 7;void main(){long N;readVars(N);long ans = 1;foreach(i;0 .. N){(ans *= (N - i)) %= mod;(ans *= (2*N - (2*i + 1))) %= mod;}writeln(ans);}void readVars(T...)(auto ref T args){auto line = readln.split;foreach(ref arg ; args){arg = line.front.to!(typeof(arg));line.popFront;}if(!line.empty){throw new Exception("args num < input num");}}