백준 2720번

김경욱·2025년 8월 1일

백준

목록 보기
15/121

import java.util.Scanner;

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

    int count = in.nextInt();

 

// 194 -> 7 1 1 4
for (int i = 0; i < count; i++)
{
int money = in.nextInt();
Q = money / 25; // 194 -> 19
D = (money-25Q) / 10; // 19 -> 9
N = (money-25
Q) % 10 / 5; //
P= (money-25*Q) %10 %5;
System.out.println(Q+" "+D+" "+N+" "+P);

    }




}

}
문제가 정말 너무나도 기쁘게 수학문제여서 기분 좋게 풀었다. 동혁이형의 세탁소 문제(2720)번을 통하여 드디어 실버5를 달성했다. 이번 연도 (2025)안에 꼭 골드5를 찍고 싶다. 간절하다 ㅜㅜ -2025.08.01 (22:50)-

PS. 참고로 전역D-11이다.

0개의 댓글