/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 34ms 17.387 MiB
#2 Accepted 333ms 20.137 MiB
#3 Accepted 344ms 20.594 MiB
#4 Accepted 309ms 19.766 MiB

Code

from math import isqrt


for _ in range(int(input())):
    k = int(input())
    sqrt = isqrt(2 * k + 2)
    if sqrt * (sqrt + 1) / 2 - 1 == k:
        print('b')
    else:
        print('a')

Information

Submit By
Type
Submission
Problem
P1223 C. Infinity Sequence
Contest
Happy New Year 2026
Language
PyPy 3 (Python 3.9.18 PyPy 7.3.15)
Submit At
2026-01-06 16:32:19
Judged At
2026-01-06 16:32:19
Judged By
Score
100
Total Time
344ms
Peak Memory
20.594 MiB