/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Time Exceeded ≥1098ms ≥8.227 MiB
#2 Time Exceeded ≥1081ms ≥38.305 MiB

Code

t=int(input())
for i in range(t):
	pattern=""
	k=int(input())
	aCount=1
	for j in range(k):
		pattern+="a"*aCount
		pattern+="b"
		aCount+=1
	print(pattern,pattern[k-1])

Information

Submit By
Type
Submission
Problem
P1223 C. Infinity Sequence
Contest
Happy New Year 2026
Language
Python 3 (Python 3.12.3)
Submit At
2026-01-06 15:29:36
Judged At
2026-01-06 15:29:37
Judged By
Score
0
Total Time
≥1098ms
Peak Memory
≥38.305 MiB