提出 #52328192


ソースコード 拡げる

# -*- 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()

提出情報

提出日時
問題 B - Commencement
ユーザ DINGOO
言語 Python (CPython 3.11.4)
得点 200
コード長 489 Byte
結果 AC
実行時間 12 ms
メモリ 9192 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 3
AC × 17
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
00_sample_01.txt AC 12 ms 9076 KiB
00_sample_02.txt AC 12 ms 9152 KiB
00_sample_03.txt AC 12 ms 9164 KiB
01_random_01.txt AC 12 ms 9080 KiB
01_random_02.txt AC 12 ms 9036 KiB
01_random_03.txt AC 12 ms 9164 KiB
01_random_04.txt AC 12 ms 9168 KiB
01_random_05.txt AC 12 ms 9100 KiB
01_random_06.txt AC 12 ms 9088 KiB
01_random_07.txt AC 12 ms 9144 KiB
01_random_08.txt AC 12 ms 9192 KiB
01_random_09.txt AC 12 ms 9148 KiB
01_random_10.txt AC 12 ms 9164 KiB
02_handmade_01.txt AC 12 ms 9156 KiB
02_handmade_02.txt AC 12 ms 9072 KiB
02_handmade_03.txt AC 12 ms 9032 KiB
02_handmade_04.txt AC 12 ms 9096 KiB