Submission #64731686


Source Code Expand

Copy
n = int(input())
ans = 0
login = 0
for _ in range(n):
s = input()
if login == 0 and s == "private":
ans += 1
elif s == "login":
login = 1
elif s == "logout":
login = 0
print(ans)
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
n = int(input())
ans = 0
login = 0
for _ in range(n):
    s = input()
    if login == 0 and s == "private":
        ans += 1
    elif s == "login":
        login = 1
    elif s == "logout":
        login = 0
print(ans)

Submission Info

Submission Time
Task B - Unauthorized
User juntenbanana
Language Python (CPython 3.11.4)
Score 200
Code Size 231 Byte
Status AC
Exec Time 10 ms
Memory 8596 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 16
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 10 ms 8524 KB
00_sample_01.txt AC 10 ms 8596 KB
00_sample_02.txt AC 10 ms 8492 KB
01_random_03.txt AC 10 ms 8540 KB
01_random_04.txt AC 10 ms 8548 KB
01_random_05.txt AC 10 ms 8500 KB
01_random_06.txt AC 10 ms 8456 KB
01_random_07.txt AC 10 ms 8468 KB
01_random_08.txt AC 10 ms 8592 KB
01_random_09.txt AC 10 ms 8464 KB
01_random_10.txt AC 10 ms 8544 KB
01_random_11.txt AC 10 ms 8504 KB
01_random_12.txt AC 10 ms 8596 KB
01_random_13.txt AC 10 ms 8476 KB
01_random_14.txt AC 10 ms 8512 KB
01_random_15.txt AC 10 ms 8380 KB


2025-04-26 (Sat)
20:43:56 +09:00