[백준] 10886번 : 0=not cut/1=cute - Java(자바)

강재원·2022년 9월 30일
0

[코딩테스트] Java

목록 보기
80/200



https://www.acmicpc.net/problem/10886

import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner s=new Scanner(System.in);
        int n=s.nextInt();
        int c0=0;
        int c1=0;
        for(int i=0;i<n;i++){
            int a=s.nextInt();
            if(a==0) c0++;
            else if(a==1) c1++;
        }
        if(c0>c1) System.out.print("Junhee is not cute!");
        else System.out.print("Junhee is cute!");
    }
}
profile
개념정리 & 문법 정리 & 알고리즘 공부

0개의 댓글