백준 1476번 : 날짜 계산


백준 1476번 : 날짜 계산

import java.util.Scanner; public class a1476 { public static void main(String[] args){ Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); int x=-1, y=0, z=0; while(true){ while(true){ x++; if((15*x+a)==(28*y+b)) break; else if((15*x+a)>(28*y+b)) y++; } if((28*y+b)>(19*z+c)){ while(true){ z++; if((28*y+b)


원문링크 : 백준 1476번 : 날짜 계산