結果
問題 |
No.701 ひとりしりとり
|
ユーザー |
![]() |
提出日時 | 2018-06-15 23:28:36 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 377 bytes |
コンパイル時間 | 182 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-06-30 15:30:26 |
合計ジャッジ時間 | 2,258 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 RE * 8 |
ソースコード
import itertools n=int(input()) def solve(a): ans="abcdefghi" cnt_str="abcdefghijklmopqrstuvwxyz" cnt=0 for s in itertools.permutations(ans): start=cnt%26 end=start+1 if end==26: end=0 print(cnt_str[start]+"".join(list(s))+cnt_str[end]) cnt+=1 if cnt==(a-1): print(cnt_str[end]+"".join(list(s))+"n") break return solve(n)