알고리즘 자바로 풀기 시작
시간 짧게 나온거 조아서 올려둠
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void solution() throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
n += n % 4;
while (n != 0) {
System.out.print("long ");
n = n - 4;
}
System.out.print("int");
br.close();
}
public static void main(String[] args) throws IOException {
solution();
}
}
|
cs |
'개발공부 > 문제풀기' 카테고리의 다른 글
COCI '18 Contest 4 #1 Elder (2) | 2022.06.22 |
---|---|
백준 10828 - 스택 (0) | 2022.03.26 |
백준 4153 - 직각삼각형 (0) | 2022.03.21 |
백준 1920 - 수 찾기 (0) | 2022.03.21 |
백준 2525 - 오븐시계 (0) | 2022.03.20 |
댓글