Submission #63515115


Source Code Expand

# Atcoder ABC396
# B - Card Pile

Q = int(input())

cards = [0 for i in range(100)] # カードの山_末尾が上
query = []

for i in range(Q):
    query.append(list(map(int, input().split())))

for i in range(Q):
    if query[i][0] == 1:
        cards.append(query[i][1])
    if query[i][0] == 2:
        popped = cards.pop(-1)
        print(popped)
exit()

Submission Info

Submission Time
Task B - Card Pile
User Task3
Language Python (CPython 3.11.4)
Score 200
Code Size 378 Byte
Status AC
Exec Time 11 ms
Memory 8940 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 23
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt
All 00_sample_00.txt, 00_sample_01.txt, 01_handmade_00.txt, 01_handmade_01.txt, 01_handmade_02.txt, 01_handmade_03.txt, 01_handmade_04.txt, 01_handmade_05.txt, 02_random_00.txt, 02_random_01.txt, 02_random_02.txt, 02_random_03.txt, 02_random_04.txt, 02_random_05.txt, 02_random_06.txt, 02_random_07.txt, 02_random_08.txt, 02_random_09.txt, 02_random_10.txt, 02_random_11.txt, 02_random_12.txt, 02_random_13.txt, 02_random_14.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 10 ms 8816 KiB
00_sample_01.txt AC 10 ms 8940 KiB
01_handmade_00.txt AC 11 ms 8872 KiB
01_handmade_01.txt AC 10 ms 8852 KiB
01_handmade_02.txt AC 11 ms 8832 KiB
01_handmade_03.txt AC 10 ms 8892 KiB
01_handmade_04.txt AC 11 ms 8892 KiB
01_handmade_05.txt AC 11 ms 8748 KiB
02_random_00.txt AC 10 ms 8872 KiB
02_random_01.txt AC 11 ms 8892 KiB
02_random_02.txt AC 10 ms 8752 KiB
02_random_03.txt AC 10 ms 8760 KiB
02_random_04.txt AC 11 ms 8836 KiB
02_random_05.txt AC 10 ms 8892 KiB
02_random_06.txt AC 10 ms 8876 KiB
02_random_07.txt AC 11 ms 8820 KiB
02_random_08.txt AC 11 ms 8892 KiB
02_random_09.txt AC 10 ms 8768 KiB
02_random_10.txt AC 11 ms 8872 KiB
02_random_11.txt AC 11 ms 8888 KiB
02_random_12.txt AC 10 ms 8892 KiB
02_random_13.txt AC 11 ms 8880 KiB
02_random_14.txt AC 10 ms 8900 KiB