题目描述
blablabla
样例
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(n);
System.out.printf("%d nota(s) de R$ 100,00\n", n / 100);
n %= 100;
System.out.printf("%d nota(s) de R$ 50,00\n", n / 50);
n %= 50;
System.out.printf("%d nota(s) de R$ 20,00\n", n / 20);
n %= 20;
System.out.printf("%d nota(s) de R$ 10,00\n", n / 10);
n %= 10;
System.out.printf("%d nota(s) de R$ 5,00\n", n / 5);
n %= 5;
System.out.printf("%d nota(s) de R$ 2,00\n", n / 2);
n %= 2;
System.out.printf("%d nota(s) de R$ 1,00\n", n / 1);
}
}
算法1
(暴力枚举) $O(n^2)$
blablabla
时间复杂度
参考文献
C++ 代码
blablabla
算法2
(暴力枚举) $O(n^2)$
blablabla
时间复杂度
参考文献
C++ 代码
blablabla