Submission #52328192
Source Code Expand
Copy
# -*- coding: utf-8 -*-import collectionsS = input()letters = []alreadyused = []for i in range(0,len(S)):if S[i] not in alreadyused:letters.append(S.count(S[i]))alreadyused.append(S[i])continueelse:continuefor i in range(0,len(letters)):if letters.count(letters[i]) == 2:continueelif letters.count(letters[i]) == 0:continueelse:print("No")exit()print("Yes")
# -*- coding: utf-8 -*- import collections S = input() letters = [] alreadyused = [] for i in range(0,len(S)): if S[i] not in alreadyused: letters.append(S.count(S[i])) alreadyused.append(S[i]) continue else: continue for i in range(0,len(letters)): if letters.count(letters[i]) == 2: continue elif letters.count(letters[i]) == 0: continue else: print("No") exit() print("Yes") exit()
Submission Info
Submission Time | |
---|---|
Task | B - Commencement |
User | DINGOO |
Language | Python (CPython 3.11.4) |
Score | 200 |
Code Size | 489 Byte |
Status | AC |
Exec Time | 12 ms |
Memory | 9192 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
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 | 12 ms | 9076 KB |
00_sample_02.txt | AC | 12 ms | 9152 KB |
00_sample_03.txt | AC | 12 ms | 9164 KB |
01_random_01.txt | AC | 12 ms | 9080 KB |
01_random_02.txt | AC | 12 ms | 9036 KB |
01_random_03.txt | AC | 12 ms | 9164 KB |
01_random_04.txt | AC | 12 ms | 9168 KB |
01_random_05.txt | AC | 12 ms | 9100 KB |
01_random_06.txt | AC | 12 ms | 9088 KB |
01_random_07.txt | AC | 12 ms | 9144 KB |
01_random_08.txt | AC | 12 ms | 9192 KB |
01_random_09.txt | AC | 12 ms | 9148 KB |
01_random_10.txt | AC | 12 ms | 9164 KB |
02_handmade_01.txt | AC | 12 ms | 9156 KB |
02_handmade_02.txt | AC | 12 ms | 9072 KB |
02_handmade_03.txt | AC | 12 ms | 9032 KB |
02_handmade_04.txt | AC | 12 ms | 9096 KB |