結果

問題 No.701 ひとりしりとり
ユーザー 双六双六
提出日時 2020-07-25 15:09:59
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 904 bytes
コンパイル時間 340 ms
コンパイル使用メモリ 86,928 KB
実行使用メモリ 81,408 KB
最終ジャッジ日時 2023-09-09 13:27:56
合計ジャッジ時間 3,660 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 110 ms
73,580 KB
testcase_02 AC 110 ms
73,508 KB
testcase_03 AC 113 ms
73,508 KB
testcase_04 AC 111 ms
73,372 KB
testcase_05 AC 109 ms
73,636 KB
testcase_06 AC 110 ms
73,660 KB
testcase_07 AC 110 ms
73,344 KB
testcase_08 AC 121 ms
78,328 KB
testcase_09 AC 132 ms
79,808 KB
testcase_10 AC 148 ms
79,980 KB
testcase_11 AC 249 ms
80,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 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))
	start = None
	for 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 = val
			word += val
			print(word)
		else:
			word = start
			for j in range(18):
				word += L[random.randrange(25)]
			val = L[random.randrange(25)]
			start = val
			word += val
			print(word)

	word = start
	for j in range(18):
		word += L[random.randrange(25)]
	word += "n"
	print(word)
	
if __name__ == '__main__':
	main()
0