| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:请问一下,这道题怎么解啊?不会用二项展开式吧或高精度吧?In Reply To:请问一下,这道题怎么解啊?不会用二项展开式吧或高精度吧? Posted by:yinsheng at 2005-04-02 23:10:39 > #include <iostream>
> #include <stdlib.h>
>
> using namespace std;
>
> int main(int argc, char *argv[])
> {
> float r,m,y;
> int i;
> float money;
> float rate;
> while (cin>>r>>m>>y) {
> money = m;
> rate = r/100;
> rate = 1+rate;
> for(i=1;i<=y;i++) {
> money = money*rate;
> }
> printf("%.0f\n",money-0.5);
> }
> //system("PAUSE");
> return 0;
> }
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator