結果

問題 No.701 ひとりしりとり
ユーザー EscaityEscaity
提出日時 2020-02-22 18:24:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 366 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 89,984 KB
最終ジャッジ日時 2024-04-18 02:58:21
合計ジャッジ時間 3,405 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
11,264 KB
testcase_01 AC 33 ms
11,392 KB
testcase_02 AC 36 ms
11,264 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 40 ms
11,136 KB
testcase_06 AC 42 ms
11,392 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import random
import string


n = int(input())

s = [list(random.choice(string.ascii_letters).lower() for _ in range(random.randint(5, 20))) for _ in range(n)]

for i, v in enumerate(s):
    if i >= 1 and v[0] != s[i - 1][-1]:
        s[i - 1][-1] = v[0]
    if i == len(s)-1:
        s[-1][-1] = "n"
i = 0
while i <= len(s) - 1:
    print("".join(s[i]))
    i += 1
0