原来强行转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. 笔记——collections模块

    collections模块 collections模块在内置数据类型(dict.list.set.tuple)的基础上,还提供了几个额外的数据类型:ChainMap.Counter.deque.def ...

  2. JS判断滚动条是否停止滚动

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  3. MySQL SQL语句 生成32位 UUID

    在运营中,有时会碰到线下下单,线下注册,需要在数据库对其数据批量生成导入的场景. 此时如果你的数据表主键并不是Int整型自动递增而是32位的UUID这种情况该怎么办呢? MySQL 其实实现了UUID ...

  4. intellij idea 忽略文件不提交

    文件已经纳入版本管理 如果文件已经纳入版本了,应该采用此方法 此方法主要应对文件已经纳入版本管理,但不想再提交,比如,不小心提交的eclipse.intellij的文件,以后不想再提交了,这种就通过v ...

  5. 扫描局域网内所有主机和MAC地址的Shell脚本

    #!/bin/bash #author: InBi #date: 2011-08-16 #website: http://www.itwhy.org/2011/08-20/939.html ##### ...

  6. [TJOI2010]中位数

    题目描述 给定一个由N个元素组成的整数序列,现在有两种操作: 1 add a 在该序列的最后添加一个整数a,组成长度为N + 1的整数序列 2 mid 输出当前序列的中位数 中位数是指将一个序列按照从 ...

  7. msp430入门学习11

    msp430的定时器--看门狗 msp430入门学习

  8. POJ 3723 Conscription【最小生成树】

    题意: 征用一些男生和女生,每个应都要给10000元,但是如果某个男生和女生之间有关系,则给的钱数为10000减去相应的亲密度,征集一个士兵时一次关系只能使用一次. 分析: kruskal求最小生成树 ...

  9. [bzoj4131]并行博弈_博弈论

    并行博弈 bzoj-4131 题目大意:题目链接. 注释:略. 想法:我们发现无论如何操作都会使得$(1,1)$发生改变. 所以单个$ACG$的胜利条件就是$(1,1)$是否为黑色. 如果为黑色那么可 ...

  10. 激活IDEA 2019.1

    First step: 先下载jar包JetbrainsCrack.jar,把它放到你认为合适的文件夹内, 我放在了安装目录C:\Program Files\JetBrains\IntelliJ ID ...