-
[java]백준 Identifying tea 11549번알고리즘 문제풀이/백준(자바) 2023. 5. 29. 18:30
코드
import java.util.Scanner; public class BOJ_11549 { public static void main(String[] args) { Scanner in =new Scanner(System.in); int q=in.nextInt(); int a=in.nextInt(); int b=in.nextInt(); int c=in.nextInt(); int d=in.nextInt(); int f=in.nextInt(); int s=0; if (a==q) { s+=1; } if (b==q) { s+=1; } if (c==q) { s+=1; } if (d==q) { s+=1; } if (f==q) { s+=1; } System.out.println(s); in.close(); } }
링크
https://www.acmicpc.net/problem/11549
'알고리즘 문제풀이 > 백준(자바)' 카테고리의 다른 글
[java]백준 커트라인 25305번 (0) 2023.05.30 [java]백준 이상한 기호 15964번 (0) 2023.05.29 [java]백준 녹색거탑 24723번 (0) 2023.05.28 [java]백준 상근이의 친구들 5717번 (0) 2023.05.27 [java]백준 과자 10156번 (0) 2023.05.26