이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
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)
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |