๐Ÿ Python/๋ฐฑ์ค€

    [1316]๊ทธ๋ฃน ๋‹จ์–ด ์ฒด์ปค

    import sys N = int(sys.stdin.readline()) for _ in range(N): noun = sys.stdin.readline().rstrip() arr = [] temp = 0 for alp in noun: arr.append(alp) if len(arr) == 1: continue else: for i in range(len(arr) - 1): if arr[i] != arr[i+1]: temp += 1 if temp >= len(set(arr)): N -= 1 print(N) 1316 ๊ทธ๋ฃน ๋‹จ์–ด ์ฒด์ปค

    [2941]ํฌ๋กœ์•„ํ‹ฐ์•„ ์•ŒํŒŒ๋ฒณ

    import sys alp_cro = sys.stdin.readline().rstrip() arr = ['c=', 'c-', 'dz=', 'd-', 'lj', 'nj', 's=', 'z='] for alp in arr: if alp in alp_cro: alp_cro = alp_cro.replace(alp, '*') print(len(alp_cro)) 2941 ํฌ๋กœ์•„ํ‹ฐ์•„ ์•ŒํŒŒ๋ฒณ

    [5622]๋‹ค์ด์–ผ

    import sys alp_arr = sys.stdin.readline().rstrip() time_tot = 0 for alp in alp_arr: if alp in 'ABC': time_tot += 3 elif alp in 'DEF': time_tot += 4 elif alp in 'GHI': time_tot += 5 elif alp in 'JKL': time_tot += 6 elif alp in 'MNO': time_tot += 7 elif alp in 'PQRS': time_tot += 8 elif alp in 'TUV': time_tot += 9 else: time_tot += 10 print(t..

    [1157]๋‹จ์–ด ๊ณต๋ถ€

    import sys import string S = sys.stdin.readline().lower() alpha_ls = string.ascii_lowercase alpha_ct = [] for i in alpha_ls: count = 0 for j in S: if i == j: count += 1 alpha_ct.append(count) max_ls = [i for i in alpha_ct if i == max(alpha_ct)] if len(max_ls) == 1: print(alpha_ls[alpha_ct.index(max(alpha_ct))].upper()) else : print('?') 1157 ๋‹จ์–ด ๊ณต๋ถ€ words = input().upper() unique_words = l..

    [10809]์•ŒํŒŒ๋ฒณ ์ฐพ๊ธฐ

    import sys import string S = sys.stdin.readline() alpha_str = string.ascii_lowercase for i in alpha_str: if i in S: print(S.index(i), sep=' ') else: print(-1, sep=' ') 10809 ์•ŒํŒŒ๋ฒณ ์ฐพ๊ธฐ