题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1994
水题!!!
AC代码:
1 #include<bits/stdc++.h> 2 using namespace std; 3 int main() 4 { 5 int T; 6 double Y,Q,e,f,g,sum1,sum2; 7 while(cin>>T){ 8 while(T--){ 9 cin>>Y>>Q>>e>>f>>g; 10 sum1=Y*(1.0+e/100*Q/365.0)*(1.0+g/100); 11 sum2=Y*(1.0+f/100*(Q+365)/365.0); 12 printf("%.1f\n%.1f\n",sum1,sum2); 13 } 14 } 15 return 0; 16 }