結果
問題 | No.701 ひとりしりとり |
ユーザー |
![]() |
提出日時 | 2020-07-25 15:10:48 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 214 ms / 2,000 ms |
コード長 | 940 bytes |
コンパイル時間 | 211 ms |
コンパイル使用メモリ | 82,688 KB |
実行使用メモリ | 77,940 KB |
最終ジャッジ日時 | 2024-06-27 06:27:15 |
合計ジャッジ時間 | 1,780 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
# import sys; input = sys.stdin.buffer.readline# sys.setrecursionlimit(10**7)from collections import defaultdictcon = 10 ** 9 + 7; INF = float("inf")def getlist():return list(map(int, input().split()))import random#処理内容def main():N = int(input())L = [chr(i) for i in range(97, 110)] + [chr(i) for i in range(111, 123)]rand = list(range(25))# print(chr(110))# print(len(L))if N == 1:print("n")returnstart = Nonefor i in range(N - 1):if start == None:word = ""for j in range(19):word += L[random.randrange(25)]val = L[random.randrange(25)]start = valword += valprint(word)else:word = startfor j in range(18):word += L[random.randrange(25)]val = L[random.randrange(25)]start = valword += valprint(word)word = startfor j in range(18):word += L[random.randrange(25)]word += "n"print(word)if __name__ == '__main__':main()