Submission #19556180


Source Code Expand

Copy
import math
def conbination(n, r):
    return math.factorial(n) // (math.factorial(n - r)*math.factorial(r))

n = int(input())  # nは入力回数
num_list=[0]*n
ascii_num_seki=1
for i in range(n):
    s = input()
    for k in range(10):
        ascii_num_seki*=(ord(s[k])-95)
    num_list[i]=ascii_num_seki
    ascii_num_seki=1

check_key={}
for i in range(n):
    if num_list[i] not in check_key:
        check_key[num_list[i]]=1
    else:
        check_key[num_list[i]]+=1

count=0
for v in check_key.values():
    if v>1:
        count+=conbination(v,2)
print(count)

Submission Info

Submission Time
Task C - Green Bin
User oki_516
Language Python (3.8.2)
Score 0
Code Size 595 Byte
Status WA
Exec Time 619 ms
Memory 17888 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 3
AC × 6
WA × 7
Set Name Test Cases
Sample a01, a02, a03
All a01, a02, a03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13
Case Name Status Exec Time Memory
a01 AC 25 ms 9136 KB
a02 AC 18 ms 9016 KB
a03 AC 23 ms 9020 KB
b04 AC 17 ms 8916 KB
b05 WA 363 ms 12948 KB
b06 WA 367 ms 14624 KB
b07 AC 368 ms 14416 KB
b08 WA 368 ms 17808 KB
b09 WA 370 ms 17172 KB
b10 WA 364 ms 17812 KB
b11 AC 619 ms 15772 KB
b12 WA 408 ms 17888 KB
b13 WA 25 ms 8980 KB