반응형
🎈문제
https://www.acmicpc.net/problem/25314
💬설명
- long하나에 4바이트로 가정하자
- for문을 사용하여 long를 반복 출력해보자
⌨️ CODE
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int b = sc.nextInt();
int c = b/4;
for(int i = 1 ; i <= c ; i++) {
System.out.print("long ");
}
System.out.print("int");
}
}
반응형
'CS > BaekJoon' 카테고리의 다른 글
[BaekJoon] 백준 11021번 빠른 A+B - 7 - Java (0) | 2023.12.29 |
---|---|
[BaekJoon] 백준 15552번 빠른 A+B - Java (1) | 2023.12.28 |
[BaekJoon] 백준 25304번 영수증 - Java (0) | 2023.12.28 |
[BaekJoon] 백준 8393번 합 - Java (0) | 2023.12.27 |
[BaekJoon] 백준 10950번 A+B - 3 - Java (0) | 2023.12.27 |