import?java.util.Scanner;
public?class?Demo?{
????public?static?void?main(String[]?args){
????????Scanner?sc?=?new?Scanner(System.in);
????????int?A?=?sc.nextInt();
????????int?C1?=?sc.nextInt();
????????int?C5?=?sc.nextInt();
????????int?C10?=?sc.nextInt();
????????int?C50?=?sc.nextInt();
????????int?C100?=?sc.nextInt();
????????int?C500?=?sc.nextInt();
????????int?count?=?0;
????????int?r?=?A;
????????while(C500--?>?0?&&?r?>=?500){
????????????r?-=?500;
????????????count++;
????????}
????????while(C100--?>?0?&&?r?>=?100){
????????????r?-=?100;
????????????count++;
????????}
????????while(C50--?>?0?&&?r?>=?50){
????????????r?-=?50;
????????????count++;
????????}
????????while(C10--?>?0?&&?r?>=?10){
????????????r?-=?10;
????????????count++;
????????}
????????while(C5--?>?0?&&?r?>=?5){
????????????r?-=?5;
????????????count++;
????????}
????????while(C1--?>?0?&&?r?>=?1){
????????????r?-=?1;
????????????count++;
????????}
????????System.out.print(count);
????}
}為什么會(huì)報(bào)runtime error錯(cuò)誤按道理說一定有一個(gè)解的
關(guān)于一道java題目
MOCKINGT
2018-02-27 14:12:48