原来强行转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. 关于测试驱动的开发模式以及实战部分,建议看《Python Web开发测试驱动方法》这本书

    关于测试驱动的开发模式以及实战部分,建议看<Python Web开发测试驱动方法>这本书

  2. hihoCoder#1051 补提交卡

    原题地址 简单贪心 首先,补提交卡应该连续使用,其次,补提交卡应该全部用掉(如果补提交卡多于未提交天数则额外处理) 所以,依次遍历未提交日期,计算:从当前位置开始,用M张补提交卡覆盖后面连续M个数字, ...

  3. hdu 3622 二分+2-sat

    /* 二分+2-sat 题意:在一个二维平面上给你n个炸弹,和2*n个位置,每一行的两个位置只能有一个放炸弹 现在炸弹爆炸有一个半径,当炸弹爆炸时两个炸弹的半径化成的圆不能相交,求最大半径 二分半径, ...

  4. codeforces 369B

    #include<stdio.h>//题没读懂,没做出来 int main() {      int n,k,l,r,s,s1,m,a,i; while(scanf("%d%d% ...

  5. android开发里跳过的坑——listview不显示

    在蓝牙回调接口public void onLeScan(BluetoothDevice device, int arg1, byte[] arg2)里面调用adpter.notifyDataSetCh ...

  6. 牛客网 中南林业科技大学第十一届程序设计大赛J题 二分+线段树

    https://www.nowcoder.com/acm/contest/124#question 题意  找第一个不小于K的数的下标,然后对它前一个数加一 解析   我们可以维护一个最大值数组  1 ...

  7. 从零开始写STL—栈和队列

    从零开始写STL-栈和队列 适配器模式 意图:将一个类的接口转换成客户希望的另外一个接口.适配器模式使得原本由于接口不兼容而不能一起工作的那些类可以一起工作. 主要解决:主要解决在软件系统中,常常要将 ...

  8. CSS3(各UI元素状态伪类选择器受浏览器的支持情况)

    选择器 Firefox Safari Opera IE Chrome E:hover Y Y Y Y Y E:active Y Y Y N Y E:focus Y Y Y Y Y E:enabled ...

  9. JDBC的数据类型

    以下内容引用自http://wiki.jikexueyuan.com/project/jdbc/data-types.html: JDBC驱动程序在将Java数据类型发送到数据库之前,会将其转换为相应 ...

  10. springmvc @ResponseBody 乱码

    在spring配置文件中加入如下代码 <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMet ...