这道题是道简单题,当然,手写pow会增加难度,看自己的选择了。我这里直接用的cmath里面的pow。
thestoryofsnow | 2390 | Accepted | 144K | 0MS | C++ | 488B |
/*
ID: thestor1
LANG: C++
TASK: poj2390
*/
#include <iostream>
#include <fstream>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <limits>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <cassert>
using namespace std;
int main()
{
int R, M, Y;
scanf("%d%d%d", &R, &M, &Y);
printf("%d\n", (int)(M * pow(1 + R / 100.0, Y)));
return 0;
}