import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.util.StringTokenizer; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()," "); System.out.print(st.countTokens()); } } StringTokenizer์๋ count..
public static int search(int[] nums, int target) { int start = 0, end = nums.length - 1; while(start
๋ ์์ ๋๋์
Int((Double(num1) / Double(num2)) * 1000) ์ซ์ ๋น๊ตํ๊ธฐ num1 == num2 ? 1 : -1 ๋ถ์์ ๋ง์
let result1 = (numer1 * denom2) + (numer2 * denom1) //32 let result2 = (denom1 * denom2) //16 let gcd = (1...min(result1, result2)).reversed().first { result1 % $0 == 0 && result2 % $0 == 0 } ?? 1 return [result1/gcd, result2/gcd] ๋ฐฐ์ด ๋ ๋ฐฐ ๋ง๋ค๊ธฐ numbers.map { $0 * 2 } ๋๋จธ์ง ๊ตฌํ๊ธฐ num1 % num2 ์ค์๊ฐ ๊ตฌํ๊ธฐ array.sorted()[ar..
๋ ์์ ํฉ func solution(_ num1:Int, _ num2:Int) -> Int { return num1 + num2 } ๋ ์์ ์ฐจ func solution(_ num1:Int, _ num2:Int) -> Int { return num1 - num2 } func solution(_ num1: Int, _ num2: Int) -> Int { num1 - num2 } ๋ ์์ ๊ณฑ func solution(_ num1:Int, _ num2:Int) -> Int { num1 * num2 } ๋ชซ ๊ตฌํ๊ธฐ func solution(_ num1:Int, _ num2:Int) -> Int { num1 / num2 } ๋ฌธ์์ด ์ถ๋ ฅํ๊ธฐ let s1 = readLine()! print(s1) if let str..
'Coding Test' ์นดํ
๊ณ ๋ฆฌ์ ๊ธ ๋ชฉ๋ก
๋จ์ถํค
๋ด ๋ธ๋ก๊ทธ
๋ด ๋ธ๋ก๊ทธ - ๊ด๋ฆฌ์ ํ ์ ํ |
Q
Q
|
์ ๊ธ ์ฐ๊ธฐ |
W
W
|
๋ธ๋ก๊ทธ ๊ฒ์๊ธ
๊ธ ์์ (๊ถํ ์๋ ๊ฒฝ์ฐ) |
E
E
|
๋๊ธ ์์ญ์ผ๋ก ์ด๋ |
C
C
|
๋ชจ๋ ์์ญ
์ด ํ์ด์ง์ URL ๋ณต์ฌ |
S
S
|
๋งจ ์๋ก ์ด๋ |
T
T
|
ํฐ์คํ ๋ฆฌ ํ ์ด๋ |
H
H
|
๋จ์ถํค ์๋ด |
Shift + /
โง + /
|
* ๋จ์ถํค๋ ํ๊ธ/์๋ฌธ ๋์๋ฌธ์๋ก ์ด์ฉ ๊ฐ๋ฅํ๋ฉฐ, ํฐ์คํ ๋ฆฌ ๊ธฐ๋ณธ ๋๋ฉ์ธ์์๋ง ๋์ํฉ๋๋ค.