Submission #19556314


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
check_key={}

for i in range(n):
    s = input()
    a=''.join(sorted(s))
    if a not in check_key:
        check_key[a]=1
    else:
        check_key[a]+=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 300
Code Size 450 Byte
Status AC
Exec Time 474 ms
Memory 22868 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 13
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 18 ms 8904 KB
a02 AC 22 ms 9024 KB
a03 AC 23 ms 8912 KB
b04 AC 18 ms 8916 KB
b05 AC 213 ms 11312 KB
b06 AC 218 ms 11396 KB
b07 AC 229 ms 9608 KB
b08 AC 232 ms 22868 KB
b09 AC 231 ms 22800 KB
b10 AC 232 ms 22740 KB
b11 AC 474 ms 10936 KB
b12 AC 265 ms 16932 KB
b13 AC 22 ms 9120 KB