結果

問題 No.701 ひとりしりとり
ユーザー ttrttr
提出日時 2020-02-11 20:42:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 280 ms / 2,000 ms
コード長 264 bytes
コンパイル時間 306 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 10,112 KB
最終ジャッジ日時 2024-04-08 15:48:11
合計ジャッジ時間 1,640 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
9,984 KB
testcase_01 AC 30 ms
9,984 KB
testcase_02 AC 29 ms
9,984 KB
testcase_03 AC 29 ms
9,984 KB
testcase_04 AC 29 ms
9,984 KB
testcase_05 AC 30 ms
9,984 KB
testcase_06 AC 29 ms
9,984 KB
testcase_07 AC 29 ms
9,984 KB
testcase_08 AC 29 ms
9,984 KB
testcase_09 AC 33 ms
10,112 KB
testcase_10 AC 56 ms
10,112 KB
testcase_11 AC 280 ms
10,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

L = ["b", "c", "d", "e", "f", "g", "h", "i", "j"]
cnt = 0
import itertools
for p in itertools.permutations(L):
    if cnt == N-1:
        break
    ans = "a"
    for s in p:
        ans += s
    ans += "a"
    print(ans)
    cnt += 1

print("an")
0