Poj3085再水一下

import java.io.BufferedInputStream;
import java.util.Scanner;

/**
 * @author NC
 * Poj3085
 */
public class Main {

    public static void main(String[] args) {

        Scanner scan = new Scanner(new BufferedInputStream(System.in));
        int n = scan.nextInt();
        for (int i = 1; i <= n; i++) {
            int a = scan.nextInt();
            System.out.println(i + " " + a / 25 + " QUARTER(S), " + a % 25 / 10 + " DIME(S), " + a % 25 % 10 / 5 + " NICKEL(S), " + a % 25 % 10 % 5 + " PENNY(S)");
        }
    }
}


你可能感兴趣的:(java)