提出 #31064580
ソースコード 拡げる
n = int(input())
a = [0, 0, 0, 0, 0]
for i in range(n):
s_i = input()
if s_i[0] == "M":
a[0] += 1
if s_i[0] == "A":
a[1] += 1
if s_i[0] == "R":
a[2] += 1
if s_i[0] == "C":
a[3] += 1
if s_i[0] == "H":
a[4] += 1
answer = 0
for i in range(5):
for j in range(i + 1, 5):
for k in range(j + 1, 5):
answer += a[i] * a[j] * a[k]
print(answer)
提出情報
| 提出日時 | |
|---|---|
| 問題 | C - March |
| ユーザ | Pro_ktmr |
| 言語 | PyPy3 (7.3.0) |
| 得点 | 300 |
| コード長 | 441 Byte |
| 結果 | AC |
| 実行時間 | 175 ms |
| メモリ | 74988 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 300 / 300 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, sample_01.txt, sample_02.txt, sample_03.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 01.txt | AC | 175 ms | 74848 KiB |
| 02.txt | AC | 154 ms | 74580 KiB |
| 03.txt | AC | 150 ms | 74548 KiB |
| 04.txt | AC | 105 ms | 74932 KiB |
| 05.txt | AC | 161 ms | 74988 KiB |
| 06.txt | AC | 125 ms | 74416 KiB |
| 07.txt | AC | 140 ms | 74780 KiB |
| 08.txt | AC | 123 ms | 74464 KiB |
| 09.txt | AC | 49 ms | 61712 KiB |
| 10.txt | AC | 53 ms | 62012 KiB |
| sample_01.txt | AC | 50 ms | 62048 KiB |
| sample_02.txt | AC | 50 ms | 61844 KiB |
| sample_03.txt | AC | 53 ms | 61684 KiB |