首页 > 试题广场 >

邮票

[编程题]邮票
  • 热度指数:17528 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32M,其他语言64M
  • 算法知识视频讲解
某人有8 角的邮票5 张,1 元的邮票4 张,1 元8 角的邮票6 张,用这些邮票中的一张或若干张可以得到多少中不同的邮资?

输入描述:


输出描述:
输出一行,表示题目所求。
示例1

输入

输出

头像 在考古的小鱼干很有气魄
发表于 2023-03-15 11:30:58
#include <bits/stdc++.h> using namespace std; int main(){ set<float> st; for(int i = 0; i <= 5; i++){ for(int j = 0; j <= 4; j+ 展开全文
头像 用户抉择
发表于 2021-03-19 11:46:04
#include<iostream> #include<map> using namespace std; int main() {     map<float, int>  展开全文
头像 无问西东gmy
发表于 2023-01-17 21:31:49
#include <iostream>using namespace std;#define max 8 * 5 + 10 * 4 + 18 * 6                     展开全文
头像 荞麦假面
发表于 2025-03-09 10:32:59
#include <iostream> #include <vector> using namespace std; int main() { vector<bool> a(189, false); //最多有188角邮资 for (in 展开全文
头像 也不容易的小白菜很怕黑
发表于 2023-03-25 20:15:29
//某人有8 角的邮票5 张,1 元的邮票4 张,1 元8 角的邮票6 张, //用这些邮票中的一张或若干张可以得到多少中不同的邮资? #include<stdio.h> #define maxsize 1000 int main() { int a = 5, b = 4, c 展开全文
头像 笑川不吃香菜
发表于 2024-03-12 18:57:52
#include <bits/stdc++.h> using namespace std; int main() { set<int>s; int total = 0; for (int i = 0; i <= 5; i++) 展开全文
头像 Luka_2001
发表于 2024-02-16 23:31:07
#include <iostream> #include<set> using namespace std; int main() { set<int>s; for(int i=0;i<=5;++i){ for(int j= 展开全文
头像 牛客921131199号
发表于 2025-03-22 16:19:17
#include<bits/stdc++.h> using namespace std; vector<float> money; set<float> myset; int main() { float arr[] = {0.8, 0.8, 0.8, 展开全文
头像 牛客217671279号
发表于 2024-03-11 00:26:11
#include <iostream> #include<map> using namespace std; map<int,int> m; int ans=0; int yp[]={8,8,8,8,8,10,10,10,10,18,18,18,18,18,18} 展开全文
头像 周威zq
发表于 2021-02-22 12:35:56
#include<iostream> using namespace std; //加入第i张时可以装满,dp[i][j]=dp[i-1][j-w[i]],不加入i张也可以装满,dp[i-1][j]; //dp[i][0]=true,dp[0][j]=false; //优化成一维数组 展开全文