Submission #25427115


Source Code Expand

n = int(input())
trick =[]

while n >= 1:
    if n % 2 == 0:
        n //= 2
        trick += ['B']
    else:
        n -= 1
        trick += ['A']

trick = trick[::-1]

print(''.join(trick))

Submission Info

Submission Time
Task C - Many Balls
User cubesat
Language PyPy3 (7.3.0)
Score 300
Code Size 204 Byte
Status AC
Exec Time 88 ms
Memory 61700 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 2
AC × 20
Set Name Test Cases
Sample example0.txt, example1.txt
All 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, example0.txt, example1.txt
Case Name Status Exec Time Memory
000.txt AC 88 ms 61592 KiB
001.txt AC 54 ms 61424 KiB
002.txt AC 54 ms 61700 KiB
003.txt AC 52 ms 61676 KiB
004.txt AC 53 ms 61600 KiB
005.txt AC 46 ms 61656 KiB
006.txt AC 53 ms 61416 KiB
007.txt AC 54 ms 61548 KiB
008.txt AC 53 ms 61596 KiB
009.txt AC 54 ms 61476 KiB
010.txt AC 48 ms 61620 KiB
011.txt AC 51 ms 61640 KiB
012.txt AC 51 ms 61444 KiB
013.txt AC 52 ms 61520 KiB
014.txt AC 56 ms 61552 KiB
015.txt AC 50 ms 61568 KiB
016.txt AC 53 ms 61592 KiB
017.txt AC 52 ms 61424 KiB
example0.txt AC 52 ms 61500 KiB
example1.txt AC 53 ms 61552 KiB