题解 1197: 发工资咯

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

筛选

发工资咯,简单贪心

摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){     // 定义变量n表示输入的整数个数,a数组……

发工资咯 记way

摘要: #include using namespace std; int dir[] = { 100, 50, 10, 5, 2, 1 }; int main() {……

编写题解 1197: 发工资咯

摘要:解题思路:注意事项:参考代码:#include "stdio.h"int main() { int n; int M; while (scanf("%d", &n) != EOF)  {int k =……

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

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

1197: 发工资咯

摘要:解题思路:sum要从新置零,从新置零,从新置零。垃圾,错这么多次了还不长记性,对自己无语了。注意事项:参考代码:#include<stdio.h>#include<stdlib.h>int main(……

1197: 发工资咯

摘要:解题思路:注意事项:参考代码:def coin_change(n):     coins = [100, 50, 10, 5, 2, 1]     num = []     for coin i……