結果

問題 No.411 昇順昇順ソート
ユーザー matriematrie
提出日時 2021-01-19 20:53:08
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 164 bytes
コンパイル時間 248 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,888 KB
最終ジャッジ日時 2024-12-17 17:32:30
合計ジャッジ時間 23,436 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23 TLE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import*
n,k=map(int,input().split())
c=0
for P in permutations(range(1,n+1)):
	if P[0]!=k:continue
	c+=sum([i>j for i,j in zip(P,P[1:])])==1
print(c)
0