結果
| 問題 | No.1156 Nada Picnic 2 |
| ユーザー |
|
| 提出日時 | 2020-12-08 14:55:11 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 631 bytes |
| 記録 | |
| コンパイル時間 | 290 ms |
| コンパイル使用メモリ | 21,284 KB |
| 実行使用メモリ | 15,612 KB |
| 最終ジャッジ日時 | 2026-08-29 15:33:13 |
| 合計ジャッジ時間 | 3,068 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 2 |
ソースコード
from itertools import permutations
N = int(input())
L = []
for a, b, c, d, e, f, g in permutations(range(10), 7):
if 100*a+10*b+c + 100*d+10*e+f == 1000+100*g+10*c+b \
and [1] not in [a, b, c, d, e, f] \
and len(set([a, b, c, d, e, f])) == 6:
L += [1000+100*g+10*c+b]
break
for a, b, c, d, e, f, g, h, i in permutations(range(10), 9):
if 1000*a+100*a+10*b+c + 1000*d+100*e+10*f+g == 10000+1000*h+100*b+10*c+i \
and [1] not in [a, b, c, d, e, f, g, h, i] \
and len(set([a, b, c, d, e, f, g, h, i])) == 9:
L += [10000+1000*h+100*b+10*c+i]
break
L += [841341]
print(L[N-1])