Codeforces42 Codeforces 734A - Anton and Danik 1 2 3 4 5 6 7 n=int(input()) s=input() cnt_anton=s.count('A') cnt_danik=s.count('D') if cnt_anton > cnt_danik :print('Anton') elif cnt_anton 2022. 4. 29. codeforces 41A - Translation 1 2 3 4 s1 = input() s2 = input() if s1 == s2[::-1] : print("YES") else : print("NO") cs 2022. 4. 28. codeforces 59A - Word 1 2 3 4 5 6 7 8 9 10 s = input() cnt_lower = 0 cnt_upper = 0 for i in s: if i.isupper() : cnt_upper+=1 elif i.islower() : cnt_lower+=1 if cnt_upper > cnt_lower : s=s.upper() else: s=s.lower() print(s) cs string에서 대문자와 소문자 갯수로 구분해 구현하는 문제입니다. 2022. 4. 28. codeforces 236A. Boy or Girl 1 2 3 4 5 6 7 s=(input()) tmp = [] for i in s: if i not in tmp : tmp.append(i) if len(tmp)%2 != 1 : print('CHAT WITH HER!') else : print('IGNORE HIM!') cs 2022. 4. 28. codeforces 281A. Word Capitalization 1 2 s=(input()) print(s[0].upper()+s[1:]) cs 2022. 4. 28. codeforces 282 A. Bit++ 1 2 3 4 5 6 7 n=int(input()) ans=0 for i in range(n): s=input() if '+' in s : ans+=1 elif '-' in s : ans-=1 print(ans) cs 2022. 4. 28. 이전 1 2 3 4 다음