1197: 发工资咯 摘要:#include<iostream> using namespace std; int main(){ int a[]={100,50,10,5,2,1}; int n,mon…… 题解列表 2021年05月03日 0 点赞 0 评论 543 浏览 评分:0.0
一看就懂的简单代码 解题思路:注意事项:参考代码:#includeusingnamespacestd;inta[6]={100,50,10,5,2,1};intmain(){intn;while(cin>>n&&n!=0){intcnt=0;for(inti=1;i<=n;i++){intn 题解列表 2025年03月03日 0 点赞 0 评论 643 浏览 评分:0.0
发工资咯,简单贪心 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ // 定义变量n表示输入的整数个数,a数组…… 题解列表 2024年11月16日 0 点赞 0 评论 628 浏览 评分:0.0
发工资咯 记way #includeusingnamespacestd;intdir[]={100,50,10,5,2,1};intmain(){intn,m,ans;while(cin>>n&&n){ans=0;while(n--){cin>>m;for(inti=0;i<6&&m;++i){ans+=m/dir[i] 题解列表 2024年11月14日 0 点赞 0 评论 611 浏览 评分:0.0
简单的贪心题 摘要:解题思路: 网站指定是贪心算法,那就是最简单的类似背包题目。先从最大面值的钱开始尝试注意事项: 参考代码:#include<bits/stdc++.h>using namespace std…… 题解列表 2024年02月08日 0 点赞 0 评论 505 浏览 评分:0.0
发工资咯(动态规划) 摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; //如果发101元,有6种情况: //1.f(101)=f(101-1)+1 /…… 题解列表 2023年08月07日 0 点赞 0 评论 469 浏览 评分:0.0
1197: 发工资咯 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int Dno[6]={100,50,10,5,2,1};//面额大小 int su…… 题解列表 2022年05月18日 0 点赞 0 评论 502 浏览 评分:0.0
C++贪心法做个笔记期末复习用,说标题太短不让我发 摘要:解题思路:老师上课讲的,做个笔记期末复习用注意事项:参考代码:#include<bits/stdc++.h>using namespace std;const int maxn=1005;int n,…… 题解列表 2022年04月05日 0 点赞 0 评论 519 浏览 评分:0.0
发工资咯 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int a[6]={100,50,10,5,2,1}; int main() { …… 题解列表 2018年05月16日 0 点赞 0 评论 1278 浏览 评分:0.0
发工资咯-题解(C++代码) 摘要: ```cpp #include using namespace std; int sum = 0,temp; int max(int num) { if(num >= 100…… 题解列表 2020年02月20日 0 点赞 0 评论 1211 浏览 评分:0.0