Submission #57978753


Source Code Expand

M = int(input())

digit3 = []

for i in range(10,0,-1):
    d,m = divmod(M,3**i)
    for _ in range(d):
        digit3.append(i)
    M = m

for _ in range(M):
    digit3.append(0)

print(len(digit3))
print(*digit3)

Submission Info

Submission Time
Task B - 3^A
User entropiajp
Language Python (PyPy 3.10-v7.3.12)
Score 200
Code Size 230 Byte
Status AC
Exec Time 55 ms
Memory 76908 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 51
Set Name Test Cases
Sample 00_sample_100.txt, 00_sample_59048.txt, 00_sample_6.txt
All 00_sample_100.txt, 00_sample_59048.txt, 00_sample_6.txt, 01_small_1.txt, 01_small_10.txt, 01_small_11.txt, 01_small_2.txt, 01_small_3.txt, 01_small_4.txt, 01_small_5.txt, 01_small_7.txt, 01_small_8.txt, 01_small_9.txt, 02_large_39365.txt, 02_large_52487.txt, 02_large_56861.txt, 02_large_58319.txt, 02_large_58805.txt, 02_large_58967.txt, 02_large_59021.txt, 02_large_59039.txt, 02_large_59045.txt, 02_large_98414.txt, 03_handmade_100000.txt, 03_handmade_78732.txt, 03_handmade_98409.txt, 03_handmade_98412.txt, 03_handmade_98413.txt, 03_handmade_98415.txt, 03_handmade_99144.txt, 03_handmade_99870.txt, 03_handmade_99871.txt, 03_handmade_99872.txt, 03_handmade_99873.txt, 03_handmade_99953.txt, 03_handmade_99954.txt, 03_handmade_99981.txt, 03_handmade_99990.txt, 03_handmade_99997.txt, 03_handmade_99998.txt, 03_handmade_99999.txt, 04_random_11273.txt, 04_random_16808.txt, 04_random_27545.txt, 04_random_37710.txt, 04_random_43659.txt, 04_random_50074.txt, 04_random_50879.txt, 04_random_75250.txt, 04_random_77924.txt, 04_random_8931.txt
Case Name Status Exec Time Memory
00_sample_100.txt AC 54 ms 76528 KiB
00_sample_59048.txt AC 53 ms 76436 KiB
00_sample_6.txt AC 53 ms 76504 KiB
01_small_1.txt AC 53 ms 76428 KiB
01_small_10.txt AC 53 ms 76768 KiB
01_small_11.txt AC 53 ms 76460 KiB
01_small_2.txt AC 53 ms 76656 KiB
01_small_3.txt AC 53 ms 76716 KiB
01_small_4.txt AC 54 ms 76572 KiB
01_small_5.txt AC 54 ms 76524 KiB
01_small_7.txt AC 54 ms 76516 KiB
01_small_8.txt AC 54 ms 76660 KiB
01_small_9.txt AC 53 ms 76548 KiB
02_large_39365.txt AC 54 ms 76416 KiB
02_large_52487.txt AC 53 ms 76528 KiB
02_large_56861.txt AC 53 ms 76752 KiB
02_large_58319.txt AC 54 ms 76760 KiB
02_large_58805.txt AC 55 ms 76400 KiB
02_large_58967.txt AC 54 ms 76472 KiB
02_large_59021.txt AC 54 ms 76368 KiB
02_large_59039.txt AC 54 ms 76516 KiB
02_large_59045.txt AC 54 ms 76640 KiB
02_large_98414.txt AC 54 ms 76376 KiB
03_handmade_100000.txt AC 54 ms 76748 KiB
03_handmade_78732.txt AC 53 ms 76908 KiB
03_handmade_98409.txt AC 54 ms 76496 KiB
03_handmade_98412.txt AC 53 ms 76536 KiB
03_handmade_98413.txt AC 53 ms 76856 KiB
03_handmade_98415.txt AC 54 ms 76548 KiB
03_handmade_99144.txt AC 54 ms 76552 KiB
03_handmade_99870.txt AC 53 ms 76556 KiB
03_handmade_99871.txt AC 53 ms 76388 KiB
03_handmade_99872.txt AC 54 ms 76532 KiB
03_handmade_99873.txt AC 53 ms 76532 KiB
03_handmade_99953.txt AC 53 ms 76512 KiB
03_handmade_99954.txt AC 53 ms 76536 KiB
03_handmade_99981.txt AC 54 ms 76692 KiB
03_handmade_99990.txt AC 53 ms 76680 KiB
03_handmade_99997.txt AC 53 ms 76516 KiB
03_handmade_99998.txt AC 54 ms 76368 KiB
03_handmade_99999.txt AC 54 ms 76572 KiB
04_random_11273.txt AC 54 ms 76864 KiB
04_random_16808.txt AC 54 ms 76520 KiB
04_random_27545.txt AC 54 ms 76340 KiB
04_random_37710.txt AC 53 ms 76504 KiB
04_random_43659.txt AC 53 ms 76344 KiB
04_random_50074.txt AC 53 ms 76720 KiB
04_random_50879.txt AC 53 ms 76672 KiB
04_random_75250.txt AC 53 ms 76232 KiB
04_random_77924.txt AC 54 ms 76540 KiB
04_random_8931.txt AC 54 ms 76464 KiB