原来强行转int可以避免四舍五入啊

#include<iostream>
#include<cstdio>
using namespace std;
int r,y;
double m;
int main()
{
scanf("%d%lf%d",&r,&m,&y);
double l=1.0+(double)r/100.0;
for(int i=1;i<=y;i++)
m*=l;
printf("%d\n",(int)m);
return 0;
}

bzoj 1755: [Usaco2005 qua]Bank Interest【模拟】的更多相关文章

  1. 1755: [Usaco2005 qua]Bank Interest

    1755: [Usaco2005 qua]Bank Interest Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 187  Solved: 162[Su ...

  2. bzoj1755 [Usaco2005 qua]Bank Interest

    Description Farmer John made a profit last year! He would like to invest it well but wonders how muc ...

  3. BZOJ 1754: [Usaco2005 qua]Bull Math

    Description Bulls are so much better at math than the cows. They can multiply huge integers together ...

  4. bzoj 1753: [Usaco2005 qua]Who's in the Middle【排序】

    --这可能是早年Pascal盛行的时候考排序的吧居然还是Glod-- #include<iostream> #include<cstdio> #include<algor ...

  5. bzoj 1754: [Usaco2005 qua]Bull Math【高精乘法】

    高精乘法板子 然而WA了两次也是没救了 #include<iostream> #include<cstdio> #include<cstring> using na ...

  6. BZOJ1754: [Usaco2005 qua]Bull Math

    1754: [Usaco2005 qua]Bull Math Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 374  Solved: 227[Submit ...

  7. bzoj1751 [Usaco2005 qua]Lake Counting

    1751: [Usaco2005 qua]Lake Counting Time Limit: 5 Sec  Memory Limit: 64 MB Submit: 168  Solved: 130 [ ...

  8. Bank Interest

    Bank Interest Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 131072/65536K (Java/Other) Tota ...

  9. 1753: [Usaco2005 qua]Who's in the Middle

    1753: [Usaco2005 qua]Who's in the Middle Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 290  Solved:  ...

随机推荐

  1. clip-path实现loading圆饼旋转效果以及其他方法

    一.loading效果 二.clip-path css中的剪切clip-path属性是CSS Masking模块的一部分. 矩形 clip-path:inset(top right bottom le ...

  2. [HAOI2011]Problem b 题解

    题目大意: 对于给出的n个询问,每次求有多少个数对(x,y),满足a≤x≤b,c≤y≤d,且gcd(x,y)=k. 思路: 设f(k)为当1≤x≤n,1≤y≤m,且n≤m,使gcd(x,y)=k的数对 ...

  3. [POJ3463] Sightseeing(次短路 Heap + Dijkstra)

    传送门 用dijkstra比较好,spfa可能有的重复 dis[x][2]:dis[x][0]表示起点到x的最短路.dis[x][1]表示起点到x的次短路: tot[x][2]:tot[x][0]表示 ...

  4. j简单的分类实现-K近邻

          dataSetSize=dataSet.shape[0]                          voteIlabel=labels[sortedDistIndicies[i]] ...

  5. 【ZJOI2017 Round1练习&BZOJ5350】D5T1 masodik(DP,斜率优化)

    题意:你要从(0,0)点走到(n,m), 每次只能往 x 轴或者 y 轴正方向移动一个单位距离.从(i,j)移动到(i,j+1)的代价为 ri,从(i,j)移动到(i+1,j)的代价为 cj. 求最小 ...

  6. 【Intellij】Intellij Idea 2017创建web项目及tomcat部署实战

    相关软件:Intellij Idea2017.jdk16.tomcat7 Intellij Idea直接安装(可根据需要选择自己设置的安装目录),jdk使用1.6/1.7/1.8都可以,主要是配置好系 ...

  7. Linux下汇编语言学习笔记51 ---

    这是17年暑假学习Linux汇编语言的笔记记录,参考书目为清华大学出版社 Jeff Duntemann著 梁晓辉译<汇编语言基于Linux环境>的书,喜欢看原版书的同学可以看<Ass ...

  8. javaweb开发页面数字过长显示科学计数法的问题

    1. 检查该字段是否为double类型,如果是,请改成BigDecimal 2.如果是导出excel里面为科学计数法,原页面正常,是因为excel设置的原因,请参考https://jingyan.ba ...

  9. JSP的隐藏对象

    以下内容引用自http://wiki.jikexueyuan.com/project/jsp/implicit-objects.html: JSP隐式对象是Java对象,JSP容器使隐式对象在每一个页 ...

  10. Oracle将一列值逗号拼接wm_concat函数

    --Oracle12c不再支持该函数,需要手动处理 --管理员登录授权给用户权限 GRANT CREATE SYNONYM TO c##sdic; / --创建 TYPE CREATE OR REPL ...