답안 #630897

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
630897 2022-08-17T10:14:12 Z karolb2011 Cards (LMIO19_korteles) Python 3
16 / 100
993 ms 5640 KB
n=int(input())
c=[]
t=[0 for i in range(5)]
for i in range(n):
    a=input()
    b=input()
    if a=="AA" and b=="AA":
        t[0]+=1
    elif a=="AA" and b[0]=="A":
        t[1]+=1
    elif a=="AA" and b[1]=="A":
        t[2]+=1
    elif a[0]=="A" and b=="AA":
        t[3]+=1
    else:
        t[4]+=1
s=sum(t)
b=0
for i in range(5):
    for j in range(i+1,5):   
        b+=t[i]*t[j] 

print(b)
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 2772 KB Output is correct
2 Correct 13 ms 2868 KB Output is correct
3 Correct 12 ms 2804 KB Output is correct
4 Correct 13 ms 2868 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 2772 KB Output is correct
2 Correct 13 ms 2868 KB Output is correct
3 Correct 12 ms 2804 KB Output is correct
4 Correct 13 ms 2868 KB Output is correct
5 Incorrect 13 ms 2856 KB Output isn't correct
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 993 ms 5640 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 2848 KB Output is correct
2 Incorrect 141 ms 3136 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 13 ms 2856 KB Output isn't correct
2 Halted 0 ms 0 KB -