shu_1161 人民币问题
来源:互联网 发布:js map使用 编辑:程序博客网 时间:2024/06/05 18:47
http://202.121.199.212/JudgeOnline/problem.php?cid=1079&pid=17
分析: 因为每种类型的钱币都要存在,所以先减去三种类型的钱币的总数,再暴搜。
代码:
#include <iostream>#include <stdio.h>#include <algorithm>#include <string>#include <string.h>#include <ctype.h>#include <math.h>using namespace std; long long cnt;long long deal(long long e){ long long tmp=0; long long x=e-8; for(int i=0;i<=x;i+=5){ for(int j=i;j<=x;j+=2){ tmp++; } } return tmp;}int main(){ long long n; while(scanf("%lld",&n)!=EOF){ cnt=deal(n); printf("%lld\n",cnt); } return 0;}
0 0
- shu_1161 人民币问题
- 人民币问题
- 人民币问题
- 人民币问题
- 剖析人民币升值问题
- [转]人民币升值问题
- 人民币大小写转换问题
- 人民币组合问题
- 人民币转换问题
- day1 人民币问题
- 1073: 人民币问题
- hpuoj【1044】人民币问题
- 1073:人民币问题
- neuq 1202: 人民币问题
- 人民币大小写转换的问题
- 【贪心法】:人民币找钱问题
- 彻底解剖人民币升值问题 文/岑科
- 人民币贬值和外汇储备的问题
- 手机助手的那点事儿--经验之谈
- 更改csv默认分隔符
- 使用wcscat_s函数时遇到的一些问题
- ibatis+spring+mysql nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
- POJ 1265
- shu_1161 人民币问题
- 初涉R语言第四天
- javascript 判断str日期是否是今天,参数diff
- Linux 进程IPC通信实例
- poj 1265 Area
- 现代舞舞者金星
- LPC1788和LPC1768时钟配置的差异
- 最近公共祖先模版
- 从hiredis使用出core谈谈redis多线程的使用