bzoj1755[Usaco2005 qua]Bank Interest
题意:
输入R,M,Y,求出(1+R%)^Y*M。R≤20,Y≤400
题解:
恐怕是bzoj最水的题了……
代码:
1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 4 #define inc(i,j,k) for(int i=j;i<=k;i++) 5 using namespace std; 6 7 int main(){ 8 double n,m; int y; scanf("%lf%lf%d",&n,&m,&y); n=n/100+1; inc(i,1,y)m*=n; printf("%d",int(m)); return 0; 9 }
20160812