백준 25314번 코딩은 체육과목입니다(java)

마뇽미뇽·2024년 4월 29일
0

알고리즘 문제풀이

목록 보기
25/165

1.문제

https://www.acmicpc.net/submit/25314

2.풀이

n은 4의 배수이고 n/4만큼 long 단어가 반복한다.

3.코드

import java.util.Scanner;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
       int n = sc.nextInt();

        for(int i = 0; i < n/4; i++){
            System.out.print("long ");
        }
        System.out.println("int");

        sc.close();
    }
}
profile
Que sera, sera

0개의 댓글