MapleStory Finger Point

๐Ÿƒ‍โ™‚๏ธBaekjoon 128

#10807 ๊ฐœ์ˆ˜ ์„ธ๊ธฐ - python

N = int(input()) a = [] a = list(map(int,input().split())) v = int(input()) print(a.count(v)) list ๊ฐ’์„ ๊ณต๋ฐฑ๊ฐ’์ฃผ๊ณ  ๋ฐ›์•„์˜ค๊ธฐ ํŒŒ์ด์ฌ์€ ๊ตณ์ด N์„ ๋ฐ›์•„์™€๋„ ์“ธ ํ•„์š”๊ฐ€ ์—†์–ด๋ณด์ธ๋‹ค (?) - list() ํ•จ์ˆ˜ list ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด list ์•ˆ์— ์ž…๋ ฅํ•œ ๊ฐ’์ด ์ฐจ๋ก€๋Œ€๋กœ ๋“ค์–ด๊ฐ„๋‹ค. - count() ํ•จ์ˆ˜ ๋ฆฌ์ŠคํŠธ.count(์ฐพ์„๋‹จ์–ด) ์ž…๋ ฅ ์ฐพ๋Š” ๋‹จ์–ด์˜ ๊ฐœ์ˆ˜๋ฅผ ๋ฐ˜ํ™˜ํ•ด์ค€๋‹ค.

#10951 (A+B -4) - python

์ž…๋ ฅ์ด ๋๋‚˜๋ฉด EOF ๊ฐ์ง€ํ•˜๋„๋ก ํ‘œ์ค€ ์ž…๋ ฅ์—์„œ ๋” ์ด์ƒ ์ฝ์„ ๋ฐ์ดํ„ฐ๊ฐ€ ์—†์Œ -> Ctrl + Z ๋ฅผ ๋ˆŒ๋Ÿฌ์ค€๋‹ค. while True: try: a,b = map(int,input().split()) print(a+b) except EOFError: break #Ctrl + Z EOF(End of File)์€ ํŒŒ์ผ์ด๋‚˜ ๋ฐ์ดํ„ฐ ์ŠคํŠธ๋ฆผ์—์„œ ์ž…๋ ฅ์˜ ๋์„ ๋‚˜ํƒ€๋‚ด๋Š” ์šฉ์–ด์ž…๋‹ˆ๋‹ค. ํŒŒ์ด์ฌ์—์„œ EOF๋Š” ๋ณดํ†ต ํŒŒ์ผ์˜ ๋์„ ๊ฐ€๋ฆฌํ‚ค๋ฉฐ, ํŒŒ์ผ์—์„œ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ์„ ๋•Œ ์ด๋ฅผ ๊ฐ์ง€ํ•ฉ๋‹ˆ๋‹ค. EOF๋Š” ์ผ๋ฐ˜์ ์œผ๋กœ ํŒŒ์ผ ๋˜๋Š” ์ŠคํŠธ๋ฆผ์—์„œ ๋” ์ด์ƒ ์ฝ์„ ๋ฐ์ดํ„ฐ๊ฐ€ ์—†์„ ๋•Œ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

#25314 ์ฝ”๋”ฉ์€ ์ฒด์œก๊ณผ๋ชฉ - python

N = 0 N = int(input()) for i in range(N//4): print("long " ,end="") print("int") ์ผ๋‹จ N ์€ 4์˜ ๋ฐฐ์ˆ˜์ด๋ฉฐ, 4๋ฐ”์ดํŠธ์”ฉ ์ปค์งˆ๋•Œ๋งˆ๋‹ค long ์ด ํ•˜๋‚˜์”ฉ ๋ถ™๋Š” ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด๋‹ค. long ์€ for ๋ฌธ์„ ํ†ตํ•ด N์„ 4๋กœ ๋‚˜๋ˆด์„๋•Œ ๋ชซ ๋งŒํผ ์ถœ๋ ฅํ•ด์ฃผ๋ฉด ๋˜๊ณ  int ๋Š” ๋ถ€๊ฐ€์ ์œผ๋กœ ๋ถ™์—ฌ์ฃผ๋ฉด ๋

#2480 ์ฃผ์‚ฌ์œ„ ์„ธ๊ฐœ - python

a,b,c = map(int,input().split()) if(a==b==c): price = 10000+a*1000 elif (a==b or a==c or b==c): if (a==b): price =1000+a*100 elif (b==c): price =1000+b*100 else: price =1000+c*100 else: if(a>b): if(a>c): tmp = a else: tmp = c else : if (b>c): tmp = b else : tmp = c price = (tmp * 100) print(price) ๊ทธ๋ƒฅ ๊ฐ์œผ๋กœ ๋•Œ๋ ค ์ฝ”๋”ฉํ•ด์„œ ์ง€์ €๋ถ„ํ•˜๋‹ค ๋‹ค๋ฅธ ์ฝ”๋“œ๋„ ์ฐธ๊ณ ํ•ด๋ดค๋‹ค. a,b,c = map(int,input().split()) list=[a,b,c] if a==b==c : print..

#2525 ์˜ค๋ธ์‹œ๊ณ„ - python

h,m = map(int,input().split()) sm = int(input()) hT=h+int(sm/60) mT=m+int(sm%60) if (mT>=60): hT+=1 m= mT-60 h=hT if(hT>23): hT-=24 h=hT else: m = mT h = hT if(hT>23): hT-=24 h=hT print(h,m) ์Šค์Šค๋กœ ํ’€์–ด๋ณธ ๊ฒฐ๊ณผ... ใ…œ ๋งŽ์ด ๋ณต์žกํ•˜์ง€๋งŒ ํ†ต๊ณผํ–ˆ๋‹ค. ์‹œ๊ฐ„ ๊ณ„์‚ฐ์‹œ %24 ํ™œ์šฉ์„ ์ƒ๊ฐ ๋ชปํ•ด์„œ ๊ธธ์–ด์ง„ ๊ฒƒ ๊ฐ™๋‹ค. ํ•˜๋‹จ์—” ๋” ์ข‹์€ ์ฝ”๋”ฉ์„ ๊ฐ€์ง€๊ณ  ์™”๋‹ค. if b+c < 60: print(a, b+c) else: print((a+(b+c)//60)%24, (b+c)%60) b+c 60๋ณด๋‹ค ์ž‘์œผ๋ฉด ๋ฐ”๋กœ ์ถœ๋ ฅํ•˜๊ณ  ํฐ ๊ฒฝ์šฐ์—๋Š” (b+c)//60 ๋‚˜๋ˆˆ ๋ชซ = ์‹œ๊ฐ„๊ณผ a ๋ฅผ ๋”ํ•œ๋’ค..