結果
問題 | No.2068 Restricted Permutation |
ユーザー | とりゐ |
提出日時 | 2022-08-27 14:25:17 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 232 bytes |
コンパイル時間 | 186 ms |
コンパイル使用メモリ | 82,168 KB |
実行使用メモリ | 109,588 KB |
最終ジャッジ日時 | 2024-04-26 06:47:18 |
合計ジャッジ時間 | 2,658 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 35 ms
53,208 KB |
testcase_01 | AC | 36 ms
52,460 KB |
testcase_02 | RE | - |
testcase_03 | AC | 34 ms
52,936 KB |
testcase_04 | AC | 33 ms
52,612 KB |
testcase_05 | AC | 33 ms
53,684 KB |
testcase_06 | AC | 34 ms
52,252 KB |
testcase_07 | AC | 34 ms
52,164 KB |
testcase_08 | AC | 34 ms
52,884 KB |
testcase_09 | AC | 39 ms
60,612 KB |
testcase_10 | AC | 46 ms
66,260 KB |
testcase_11 | AC | 109 ms
109,476 KB |
testcase_12 | AC | 108 ms
109,588 KB |
testcase_13 | RE | - |
testcase_14 | RE | - |
testcase_15 | RE | - |
testcase_16 | RE | - |
testcase_17 | RE | - |
testcase_18 | RE | - |
testcase_19 | RE | - |
testcase_20 | RE | - |
testcase_21 | RE | - |
testcase_22 | RE | - |
testcase_23 | RE | - |
testcase_24 | RE | - |
testcase_25 | RE | - |
ソースコード
from itertools import permutations mod=998244353 n,k,x=map(int,input().split()) if n>10: raise Exception Ps=list(permutations(list(range(1,n+1)),n)) res=0 for i in range(len(Ps)): if Ps[i][k-1]==x: res+=i print(res%mod)