mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
16 lines
229 B
Python
16 lines
229 B
Python
def problem_p03534(input_data):
|
|
S = eval(input_data)
|
|
|
|
C = {"a": 0, "b": 0, "c": 0}
|
|
|
|
for s in S:
|
|
|
|
C[s] += 1
|
|
|
|
if max(C.values()) - min(C.values()) <= 1:
|
|
|
|
return "YES"
|
|
|
|
else:
|
|
|
|
return "NO"
|