Submission #52325721


Source Code Expand

from collections import Counter

text = input()
t_len = len(text)

# print(text)
counter = Counter(text)
values = list(counter.values())
# print(values)


ans = 0

for i in range(t_len+1):
  cnt = values.count(i)
  if cnt == 0 or cnt == 2:
    ans = 0
    # print(i)
  else:
    ans = 1
    break;
    
if ans == 0:
  print("Yes")
else:
  print("No")

Submission Info

Submission Time
Task B - Commencement
User Sirocco110
Language Python (PyPy 3.10-v7.3.12)
Score 200
Code Size 375 Byte
Status AC
Exec Time 71 ms
Memory 77100 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 17
Set Name Test Cases
Sample 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt, 02_handmade_04.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 70 ms 76940 KiB
00_sample_02.txt AC 70 ms 76784 KiB
00_sample_03.txt AC 71 ms 76704 KiB
01_random_01.txt AC 70 ms 76644 KiB
01_random_02.txt AC 70 ms 76820 KiB
01_random_03.txt AC 71 ms 76792 KiB
01_random_04.txt AC 71 ms 76784 KiB
01_random_05.txt AC 70 ms 76948 KiB
01_random_06.txt AC 70 ms 76780 KiB
01_random_07.txt AC 71 ms 76920 KiB
01_random_08.txt AC 71 ms 76920 KiB
01_random_09.txt AC 71 ms 76808 KiB
01_random_10.txt AC 70 ms 76684 KiB
02_handmade_01.txt AC 70 ms 77100 KiB
02_handmade_02.txt AC 71 ms 76688 KiB
02_handmade_03.txt AC 70 ms 76828 KiB
02_handmade_04.txt AC 71 ms 76888 KiB