`
200830740306
  • 浏览: 105780 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

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)");
        }
    }
}


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics