結果
問題 |
No.129 お年玉(2)
|
ユーザー |
![]() |
提出日時 | 2019-09-11 09:38:52 |
言語 | Nim (2.2.0) |
結果 |
MLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 379 bytes |
コンパイル時間 | 3,881 ms |
コンパイル使用メモリ | 66,244 KB |
実行使用メモリ | 784,640 KB |
最終ジャッジ日時 | 2025-03-13 20:13:43 |
合計ジャッジ時間 | 21,140 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 MLE * 28 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport]
ソースコード
import sequtils,strutils var N = stdin.readline.parseBiggestInt M = stdin.readline.parseBiggestInt c = (N div 1000) mod M memo : array[10001, array[10001, int64]] for i in 0..M: for j in 0..i: if j == 0 or j == i: memo[i][j] = 1 else: memo[i][j] = (memo[i - 1][j] + memo[i - 1][j - 1]) mod 1_000_000_000 echo memo[M][c]