https://www.acmicpc.net/problem/25314
정답
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
int n = Integer.parseInt(str);
StringBuilder sb= new StringBuilder();
for(int i =1;i<=n/4;i++){
sb.append("long ");
}
sb.append("int");
System.out.print(sb);
}
}
StringBuilder
https://lavender1122.tistory.com/274
'JAVA > 백준' 카테고리의 다른 글
[Java11] 11021번 : A+B -7 (0) | 2024.09.11 |
---|---|
[Java11] 15552번 : 빠른 A+B (0) | 2024.09.11 |
[Java11] 25304번 : 영수증 (0) | 2024.09.11 |
[Java11] 8393번 : 합 (1) | 2024.09.11 |
[Java11] 10950번 : A+B - 3 (0) | 2024.09.11 |