题解 1197: 发工资咯

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

小白随便写的,记录一下

```pythonrmb=[100,50,10,5,2,1]defchange_money(li):new_li=[0foriinrange(len(rmb))]#新列表存储每张人民币张数foriinli[1:]:#对列表里的每一个员工工资遍历index=0whilei!=0:#因为题目说工资均整数且

6个if,暴力枚举法

摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Main {     public static void main(String[……

发工资咯-题解(Java代码)

摘要:解题思路:贪心算法注意事项:贪心算法,要让给出的纸币最少。先用大面值的纸币结账,如果不够,则用小一号面值的纸币,依次类推参考代码:import java.util.Scanner; public……

发工资咯(python)

摘要:解题思路:注意事项:参考代码:while True:    n, *salaries = list(map(int, input().split()))    if n == 0:        br……

1197: 发工资咯(贪心算法)

摘要:核心:票票从大开始扣,数量是最少的代码:while True:     l = [int(x) for x in input().split()]     n = l[0]     if n =……

发工资咯-题解(C语言代码)

摘要:解题思路:注意事项:参考代码://发工资,递归思路#include <stdio.h>int run (int a);int main (){ int n,sum=0; int a; while(s……

发工资咯(动态规划)

摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; //如果发101元,有6种情况: //1.f(101)=f(101-1)+1 /……

发工资咯!!!

摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Main9 {     public static void main(String[]……

1197: 发工资咯

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int Dno[6]={100,50,10,5,2,1};//面额大小 int su……

1197: 发工资咯

```javaimportjava.util.Scanner;publicclass测试{publicstaticvoidmain(String[]args){Scannersc=newScanner(System.in);while(sc.hasNext()){intn=sc.nextInt();i