백준 #25591번 푸앙이와 종윤이

jhj·2024년 2월 15일

백준 JAVA

목록 보기
308/583
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int m = sc.nextInt();
		
		int a = 100 - n;
		int b = 100 - m;
		int c = 100 - (a + b);
		int d = a * b;
		int q = d / 100;
		int r = d % 100;
		
		int front = c;
		int back = d;
		
		if(d >= 100) {
			front = c + q;
			back = d % 100;
		}
		
		System.out.println(a + " " + b + " " + c + " " + d + " " + q + " " + r);
		System.out.println(front + " " + back);
		sc.close();
	}
}
profile
개발자를 꿈꾸는

0개의 댓글