1197: 发工资咯 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int Dno[6]={100,50,10,5,2,1};//面额大小 int su…… 题解列表 2022年05月18日 0 点赞 0 评论 196 浏览 评分:0.0
发工资咯(动态规划) 摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; //如果发101元,有6种情况: //1.f(101)=f(101-1)+1 /…… 题解列表 2023年08月07日 0 点赞 0 评论 114 浏览 评分:0.0
简单的贪心题 摘要:解题思路: 网站指定是贪心算法,那就是最简单的类似背包题目。先从最大面值的钱开始尝试注意事项: 参考代码:#include<bits/stdc++.h>using namespace std…… 题解列表 2024年02月08日 0 点赞 0 评论 148 浏览 评分:0.0
发工资咯(python) 摘要:解题思路:注意事项:参考代码:while True: n, *salaries = list(map(int, input().split())) if n == 0: br…… 题解列表 2024年03月10日 0 点赞 0 评论 150 浏览 评分:0.0
6个if,暴力枚举法 摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Main { public static void main(String[…… 题解列表 2024年03月24日 0 点赞 0 评论 165 浏览 评分:0.0
小白随便写的,记录一下 摘要:```python rmb = [100, 50, 10, 5, 2, 1] def change_money(li): new_li = [0 for i in range(len(r…… 题解列表 2024年03月26日 0 点赞 0 评论 244 浏览 评分:0.0
1197: 发工资咯 摘要:解题思路:注意事项:参考代码:def coin_change(n): coins = [100, 50, 10, 5, 2, 1] num = [] for coin i…… 题解列表 2024年04月09日 0 点赞 0 评论 324 浏览 评分:0.0
1197: 发工资咯(贪心算法) 摘要:核心:票票从大开始扣,数量是最少的代码:while True: l = [int(x) for x in input().split()] n = l[0] if n =…… 题解列表 2024年08月30日 0 点赞 0 评论 293 浏览 评分:0.0
发工资咯 记way 摘要: #include using namespace std; int dir[] = { 100, 50, 10, 5, 2, 1 }; int main() {…… 题解列表 2024年11月14日 0 点赞 0 评论 239 浏览 评分:0.0
发工资咯,简单贪心 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ // 定义变量n表示输入的整数个数,a数组…… 题解列表 2024年11月16日 0 点赞 0 评论 340 浏览 评分:0.0