結果
問題 | No.1619 Coccinellidae |
ユーザー |
|
提出日時 | 2021-07-22 22:11:51 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 625 bytes |
コンパイル時間 | 365 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 68,608 KB |
最終ジャッジ日時 | 2024-07-17 18:12:38 |
合計ジャッジ時間 | 4,117 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 38 ms
52,224 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
ソースコード
perm = [1] for i in range(1, 14): perm.append(perm[-1] * i) N,M,K = [int(i) for i in input().split()] arr = [-1]*14 for i in range(1, 13): arr[i] = (K % perm[i+1]) // perm[i] K -= K % perm[i+1] used = set(arr) ans = [i if i > 0 else -1 for i in arr] for i in range(len(ans)): if ans[i] != -1: continue for j in range(1, max(N+1, 15)): if j in used: continue ans[i] = j used.add(j) break if N < 14: print("\n".join(str(i) for i in ans[:N])) else: M -= (N - 1) * N // 2 print("\n".join(str(i) for i in ans[:N]+[j for j in range(15, N)]+[M]))