結果

問題 No.701 ひとりしりとり
ユーザー Konton7Konton7
提出日時 2019-05-17 23:34:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 417 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 11,852 KB
実行使用メモリ 10,164 KB
最終ジャッジ日時 2023-10-17 07:28:35
合計ジャッジ時間 3,595 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,056 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 -
権限があれば一括ダウンロードができます

ソースコード

diff #

def terminal(x):
    return (chr(x%12+97),chr((x+1)%12+97))


def middle(x):
    chr_list = [0,0,0,0]
    for i in range(4):
        chr_list[i] = x % 26
        x = x - x % 26
        x = x // 26
    return "".join([ chr(i + 97) for i in chr_list ] ) 
         
n = int(input())

for i in range(n-1):
    s = terminal(i)[0]+middle(i)+terminal(i)[1]
    print(s)
    
if n == 1:
    print("n")
else:
    print(s+"n")
0