結果

問題 No.701 ひとりしりとり
ユーザー GrayCoderGrayCoder
提出日時 2018-06-16 06:12:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 104 ms / 2,000 ms
コード長 330 bytes
コンパイル時間 448 ms
コンパイル使用メモリ 10,720 KB
実行使用メモリ 8,368 KB
最終ジャッジ日時 2023-09-13 05:54:50
合計ジャッジ時間 1,254 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,160 KB
testcase_01 AC 15 ms
8,256 KB
testcase_02 AC 15 ms
8,124 KB
testcase_03 AC 16 ms
8,172 KB
testcase_04 AC 15 ms
8,084 KB
testcase_05 AC 16 ms
8,124 KB
testcase_06 AC 16 ms
8,272 KB
testcase_07 AC 15 ms
8,112 KB
testcase_08 AC 15 ms
8,080 KB
testcase_09 AC 17 ms
8,140 KB
testcase_10 AC 25 ms
8,192 KB
testcase_11 AC 104 ms
8,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import product

def main():
    N = int(input())

    cnt = 0
    for i1, i2, i3, i4 in product(range(97, 123), repeat=4):
        s = 'a' + chr(i1) + chr(i2) + chr(i3) + chr(i4) + 'a'
        if cnt < N - 1:
            print(s)
            cnt += 1
        else:
            print('an')
            break

main()
0