[HackerRank] Solve Java
ยท
Hi๐Ÿ–๏ธ/Java
2. Java If-Else import java.io.*; import java.math.*; import java.security.*; import java.text.*; import java.util.*; import java.util.concurrent.*; import java.util.regex.*; public class Solution { private static final Scanner scanner = new Scanner(System.in); public static void main(String[] args) { int N = scanner.nextInt(); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?"); if (N%2 != 0) {Sys..
[๋ฐฑ์ค€]4๋‹จ๊ณ„ ๋ฌธ์ œ ๋ชจ์Œ
ยท
Hi๐Ÿ–๏ธ/Java
์ œ๋ชฉ์— ๋งํฌ๋ฅผ ์ž…๋ ฅํ•˜๋ฉด ํ•ด๋‹น ๋ฌธ์ œ๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค. 1 10952 A+B - 5 Java 0 0์ด ๋“ค์–ด์˜ฌ ๋•Œ๊นŒ์ง€ A+B๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ๋ฌธ์ œ import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException{ BufferedReader bfr = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bfw = new BufferedWriter(new OutputStreamWriter(System.out)); int A =1; int B =1; while(true) { StringTokenizer st = ..
[๋ฐฑ์ค€]3๋‹จ๊ณ„ ๋ฌธ์ œ ๋ชจ์Œ
ยท
Hi๐Ÿ–๏ธ/Java
์ œ๋ชฉ์— ๋งํฌ๋ฅผ ์ž…๋ ฅํ•˜๋ฉด ํ•ด๋‹น ๋ฌธ์ œ๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค. 1 2739 ๊ตฌ๊ตฌ๋‹จ Java import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int x = scan.nextInt(); for(int i=1; i
[๋ฐฑ์ค€] 2๋‹จ๊ณ„ ๋ฌธ์ œ ๋ชจ์Œ
ยท
Hi๐Ÿ–๏ธ/Java
์ œ๋ชฉ์— ๋งํฌ๋ฅผ ์ž…๋ ฅํ•˜๋ฉด ํ•ด๋‹น ๋ฌธ์ œ๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค. 1 1330 ๋‘ ์ˆ˜ ๋น„๊ตํ•˜๊ธฐ Java import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int A = scan.nextInt(); int B = scan.nextInt(); if(A >B) System.out.println(">"); if(A89) System.out.println("A"); else if(79
[๋ฐฑ์ค€] 1๋‹จ๊ณ„ ๋ฌธ์ œ ๋ชจ์Œ
ยท
Hi๐Ÿ–๏ธ/Java
์ œ๋ชฉ์— ๋งํฌ๋ฅผ ์ž…๋ ฅํ•˜๋ฉด ํ•ด๋‹น ๋ฌธ์ œ๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค. no1 2557๋ฒˆ Hello World Python print("Hello World!") no2 10718๋ฒˆ We love kriii Java class Main{ public static void main(String[] args){ System.out.println("๊ฐ•ํ•œ์นœ๊ตฌ ๋Œ€ํ•œ์œก๊ตฐ"); System.out.println("๊ฐ•ํ•œ์นœ๊ตฌ ๋Œ€ํ•œ์œก๊ตฐ"); } } 3 10171 ๊ณ ์–‘์ด Python print("\\ /\\") print(" ) ( ')") print("( / )") print(" \\(__)|") 4 10172 ๊ฐœ Java /* |\_/| |q p| /} ( 0 )"""\ |"^"` | ||_/=\\__| */ class Main{ public..
[python] ์นด์นด์˜คํ†ก ํ…Œ๋Ÿฌ(๋งคํฌ๋กœ) ํ”„๋กœ๊ทธ๋žจ ๋งŒ๋“ค๊ธฐ
ยท
Hi๐Ÿ–๏ธ/Python
์•„๋ž˜๋Š” ์ „์ฒด์ฝ”๋“œ์ž…๋‹ˆ๋‹ค. import pyautogui import time #pyautogui.screenshot('white.png',region =(1200, 800, 50,30)) #1200,800์œ„์น˜์— 50*30ํฌ๊ธฐ๋กœ ์บก์ณ a1= pyautogui.locateCenterOnScreen('white.PNG') pyautogui.moveTo(a1) #ํ™”๋ฉด ์บก์ณํ•œ ๊ณณ ๊ฐ€์šด๋ฐ๋กœ ์ด๋™ pyautogui.click() #ํ•œ๋ฒˆ ํด๋ฆญ time.sleep(1) #1์ดˆ ๋Œ€๊ธฐ for i in range(500) : pyautogui.write('Hello World!') pyautogui.write(['enter']) ์ž‘๋™์›๋ฆฌ ๋Œ€ํ™” ์ž…๋ ฅ์ฐฝ์„ ์Šคํฌ๋ฆฐ์ƒท ํŒŒ์ผ๋กœ ์ €์žฅ์„ ํ•˜์—ฌ ํ”„๋กœ๊ทธ๋žจ์ด ์ž…๋ ฅํ•˜๋Š” ๊ณต๊ฐ„์„ ์ฐพ๊ฒŒ ๋งŒ๋“ค์–ด์คŒ. lo..
[python] ๋ฐฑ๊ณผ์‚ฌ์ „
ยท
Hi๐Ÿ–๏ธ/Python
์ „์ฒด์ฝ”๋“œ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค. import urllib.request import urllib.parse from bs4 import BeautifulSoup import os baseURL = 'https://dict.naver.com/search.nhn?dicQuery=' #๋„ค์ด๋ฒ„๋ฐฑ๊ณผ์‚ฌ์ „๋งํฌ while True : inputURL = input('๊ฒ€์ƒ‰ํ•  ๋‹จ์–ด : ') if inputURL == '๊ทธ๋งŒ' : break mixURL = baseURL + urllib.parse.quote_plus(inputURL) #ํ•œ๊ธ€๋กœ ์“ฐ๋ฉด ์•„์Šคํ‚ค์ฝ”๋“œ๋กœ ์ž๋™ ๋ณ€ํ™˜ html = urllib.request.urlopen(mixURL).read() #url๋งํฌ ๊ฐ€์ ธ์™€์„œ ์ฝ์Œ soup = BeautifulSoup(html, '..
Computer Graphics
ยท
Hi๐Ÿ–๏ธ/Computer_Graphics
------------------------- OpenGL๋กœ ๋ฐฐ์šฐ๋Š” ์ปดํ“จํ„ฐ๊ทธ๋ž˜ํ”ฝ์Šค์˜ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•˜์˜€์Šต๋‹ˆ๋‹ค. ๋‘ ๋ฒกํ„ฐ๊ฐ€ ์ˆ˜์ง์ด๋ฉด ๋‚ด์ ์˜ ๊ฐ’์€ 0. ์™ธ์ ์˜ ๊ฐ’์€ 1. ์ „๋ฉด : ๋ฒ•์„  ๋ฒกํ„ฐ๊ฐ€ ์‹œ์ ์„ ํ–ฅํ•œ ๋ฉด ํ›„๋ฉด : ๋ฉ€์–ด์ง€๋Š” ๋ฐฉํ–ฅ ๋ฒ•์„ ๋ฒกํ„ฐ ๋ฉด. ์ ˆ๋‹จ - ๋ฌผ์ฒด๋ฉด ์ค‘ ๊ฐ€์‹œ ๋ถ€ํ”ผ ๋‚ด๋ถ€์— ์กด์žฌํ•˜๋Š” ๋ฉด๋งŒ ๊ฑธ๋Ÿฌ๋‚ด๋Š” ์ž‘์—…. (4์ฐจ์› ์ ˆ๋‹จ ์ขŒํ‘œ๊ณ„์—์„œ ์ผ์–ด๋‚จ) Ø 3์ฐจ์› ์ •๊ทœํ™” ์žฅ์น˜ ์ขŒํ‘œ๊ณ„์—์„œ ์ ˆ๋‹จํ•˜๋ฉด ์‹œ์  ๋’ค์ชฝ ๋ฌผ์ฒด ์ฒ˜๋ฆฌ ์‹œ ์˜ค๋ฅ˜ ๋ฐœ์ƒํ•ด์„œ. ์€๋ฉด์ œ๊ฑฐ - ์•ž๋ฉด์— ๊ฐ€๋ ค์„œ ๋ณด์ด์ง€ ์•Š๋Š” ๋ถ€๋ถ„ ์ œ๊ฑฐ ํ›„๋ฉด - ๋ฉด์ด ์„œ์žˆ๋Š” ๋ฐฉํ–ฅ ๋•Œ๋ฌธ์— ๋ณด์ด์ง€ ์•Š๋Š” ๋ฉด. ์‹œ์ ์—์„œ ๋ฉ€์–ด์ง€๋Š” ๋ฐฉํ–ฅ์˜ ๋ฒ•์„ ๋ฒกํ„ฐ ์ง€๋‹Œ ๋ฉด. ์ ˆ๋‹จ์•Œ๊ณ ๋ฆฌ์ฆ˜ 3๊ฐœ - ์ฝ”ํ—จ-์„œ๋”๋Ÿฐ๋“œ n ๋ฌผ์ฒด ์ขŒํ‘œ๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์ ˆ๋‹จํ•œ๋‹ค๋Š” ์ ์—์„œ ๋ฌผ์ฒด ๊ณต๊ฐ„ ์•Œ๊ณ ๋ฆฌ์ฆ˜. n ์ด์›ƒ์ฝ”๋“œ์— ์˜ํ•ด ์ ˆ๋‹จ ์—ฐ์‚ฐ์†๋„ ๋†’์ธ ๊ฒƒ..
Liky
'Hi๐Ÿ–๏ธ' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก (6 Page)