์ฝ”๋”ฉ ํ…Œ์ŠคํŠธ/ํŒŒ์ด์ฌ 6

[๋ฐฑ์ค€ ํŒŒ์ด์ฌ] ๋‹จ๊ณ„๋ณ„๋กœ ํ’€์–ด๋ณด๊ธฐ - Lv6. ์‹ฌํ™” 1

# 25083 ์ƒˆ์‹น print(" ,r'\"7") print("r`-_ ,' ,/") print(" \\. \". L_r'") print(" `~\\/") print(" |") print(" |") - " ์ถœ๋ ฅ : \" - \ ์ถœ๋ ฅ : \\ # 3003 ํ‚น, ํ€ธ, ๋ฃฉ, ๋น„์ˆ, ๋‚˜์ดํŠธ, ํฐ A = list(map(int, input().split())) print(1-A[0], 1-A[1], 2-A[2], 2-A[3], 2-A[4], 8-A[5]) # 2444 ๋ณ„์ฐ๊ธฐ-7 n = int(input()) for i in range(1, n+1): print(' '*(n-i)+'*'*(2*i-1)) for i in range(n-1, 0, -1): print(' '*(n-i)+'*'*(2*i-1)) - ์—ฐ๊ฒฐํ•ด์„œ..

[๋ฐฑ์ค€ ํŒŒ์ด์ฌ] ๋‹จ๊ณ„๋ณ„๋กœ ํ’€์–ด๋ณด๊ธฐ - Lv5.๋ฌธ์ž์—ด

# 27866 ๋ฌธ์ž์™€ ๋ฌธ์ž์—ด #๋‹จ์–ด S์™€ ์ •์ˆ˜ i ์ฃผ์–ด์ง #S์˜ i๋ฒˆ์งธ ๊ธ€์ž ์ถœ๋ ฅ S = input() i = int(input()) print(S[i-1]) # 2743 ๋‹จ์–ด ๊ธธ์ด ์žฌ๊ธฐ #์•ŒํŒŒ๋ฒณ ์ž…๋ ฅ๋ฐ›์•„ ๊ธธ์ด ์ถœ๋ ฅ x = input() print(len(x)) # 9086 ๋ฌธ์ž์—ด #๋ฌธ์ž์—ด ์ž…๋ ฅ #๋ฌธ์ž์—ด ์ฒซ ๊ธ€์ž์™€ ๋งˆ์ง€๋ง‰ ๊ธ€์ž ์ถœ๋ ฅ T=int(input()) #ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค ๊ฐœ์ˆ˜ for _ in range (T) : x = input() print(x[0]+x[-1]) #x[-1]์€ ๋งˆ์ง€๋ง‰ ๊ธ€์ž - x[-1] : ๋งˆ์ง€๋ง‰ ๊ธ€์ž # 11654 ์•„์Šคํ‚ค ์ฝ”๋“œ #์ฃผ์–ด์ง„ ๊ธ€์ž์˜ ์•„์Šคํ‚ค์ฝ”๋“œ๊ฐ’ ์ถœ๋ ฅ x = input() print(ord(x)) - ord() : ์•„์Šคํ‚ค ์ฝ”๋“œ๊ฐ’ ๋ฆฌํ„ด ํ•จ์ˆ˜ - chr() : ์•„์Šคํ‚ค ์ฝ”๋“œ๊ฐ’..

[ํŒŒ์ด์ฌ ๊ฒŒ์ž„] Chimp Memory Game

chimp memory game ๊ฒฉ์ž : 5 rows(ํ–‰), 9 columns(์—ด) start ๋ฒ„ํŠผ 6 numbers (์ˆœ์ฐจ ์ฆ๊ฐ€) ๊ฒฉ์ž์— ์ˆซ์ž ๋žœ๋ค ์œ„์น˜ํ•˜๊ธฐ Hide Numbers : 1. Display Time, 2. First Number ์‹œ๊ฐ„์ด ์ง€๋‚œ ํ›„์— ์ˆซ์ž ์ˆจ๊ฒจ์ง 1์„ ๋ˆ„๋ฅด๋ฉด ๋‚˜๋จธ์ง€ ์ˆซ์ž ์ˆจ๊ฒจ์ง Correct → Next Level Wrong → Game Over ํ”„๋ ˆ์ž„ : 1_frame ๊ฐ€๋กœ 1280, ์„ธ๋กœ 720 import pygame #์ดˆ๊ธฐํ™” pygame.init() screen_width = 1280 #๊ฐ€๋กœํฌ๊ธฐ screen_height = 720 #์„ธ๋กœํฌ๊ธฐ screen = pygame.display.set_mode((screen_width, screen_height)) pygame.d..

[๋ฐฑ์ค€ ํŒŒ์ด์ฌ] ๋‹จ๊ณ„๋ณ„๋กœ ํ’€์–ด๋ณด๊ธฐ - Lv4. 1์ฐจ์› ๋ฐฐ์—ด

# 10807 ๊ฐœ์ˆ˜ ์„ธ๊ธฐ N=int(input()) x = list(map(int,input().split())) v = int(input()) print(x.count(v)) - x.count(v)๋กœ x๋ฆฌ์ŠคํŠธ ์•ˆ์— v๊ฐ€ ๋ช‡ ๊ฐœ ๋“ค์–ด๊ฐ€์žˆ๋Š”์ง€ ํ™•์ธ๊ฐ€๋Šฅ # 10871 X๋ณด๋‹ค ์ž‘์€ ์ˆ˜ N,X = map(int,input().split()) A = list(map(int, input().split())) for i in range(N) : if A[i] 42๋กœ ๋‚˜๋ˆˆ ๋‚˜๋จธ์ง€ #์„œ๋กœ ๋‹ค๋ฅธ ๊ฐ’ ๋ช‡ ๊ฐœ? A=[0]*10 for i in range(10) : x = int(input()) A[i] = (x % 42) B = set(A) print(len(B)) - ๋ฆฌ์ŠคํŠธ ์ž…๋ ฅ ๋ฐ›๊ณ  ๋ฆฌ์ŠคํŠธ๋ฅผ ์ง‘ํ•ฉ์œผ๋กœ ๋ฐ”๊ฟ”์„œ ์ค‘๋ณต๋˜๋Š” ์ˆ˜ ..

[๋ฐฑ์ค€ ํŒŒ์ด์ฌ] ๋‹จ๊ณ„๋ณ„๋กœ ํ’€์–ด๋ณด๊ธฐ - Lv3.๋ฐ˜๋ณต๋ฌธ

# 25304 ์˜์ˆ˜์ฆ #X : ์˜์ˆ˜์ฆ ์ด๊ธˆ์•ก #N : ์˜์ˆ˜์ฆ ๊ตฌ๋งค ๋ฌผ๊ฑด์˜ ์ข…๋ฅ˜ ์ˆ˜ #๊ฐ€๊ฒฉ a, ๊ฐœ์ˆ˜ b X=int(input()) N=int(input()) sum=0 for i in range (N) : a,b = map(int,input().split()) sum += a*b if sum==X : print("Yes") else : print("No") - sum=0 ์œผ๋กœ ๋ฏธ๋ฆฌ ์ดˆ๊ธฐํ™”ํ•ด์ฃผ๊ธฐ # 25314 ์ฝ”๋”ฉ์€ ์ฒด์œก๊ณผ๋ชฉ ์ž…๋‹ˆ๋‹ค. N=int(input()) x = int(N/4) for i in range(x) : print("long", end=' ') print("int") - end= ' ' : ๋ถ™์—ฌ์„œ ์ถœ๋ ฅํ•ด์คŒ, ๊ตฌ๋ถ„์€ ๊ณต๋ฐฑ # 15552 ๋น ๋ฅธ A+B import sys T=int(input())..

[๋ฐฑ์ค€ ํŒŒ์ด์ฌ] ๋‹จ๊ณ„๋ณ„๋กœ ํ’€์–ด๋ณด๊ธฐ - Lv2.์กฐ๊ฑด๋ฌธ

# 2844 ์•Œ๋žŒ์‹œ๊ณ„ #45๋ถ„ ์ผ์ฐ ์•Œ๋žŒ ์„ค์ •ํ•˜๊ธฐ #์›๋ž˜ ์„ค์ •๋˜์–ด ์žˆ๋Š” ์•Œ๋žŒ์„ 45๋ถ„ ์•ž์„œ๋Š” ์‹œ๊ฐ„์œผ๋กœ ๋ฐ”๊พธ๋Š” ๊ฒƒ #0:0~23:59 H, M = map(int,input().split()) #H์‹œ M๋ถ„ x = H*60+M y = x-45 H = int(y/60) M = int(y%60) if y