Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

怪了!!!

Posted by qichao at 2009-09-28 21:05:24 on Problem 2390
#include<iostream>
using namespace std;

int main()
{
	int R,Y;
	double M,rate;
	cin>>R>>M>>Y;
	rate=(100+R)/100.0;
	while(Y--)
		M=M*rate;
	cout<<(int)M<<endl;
	return 0;
}
这样AC了
#include<iostream>
using namespace std;

int main()
{
	int R,Y;
	float M,rate;
	cin>>R>>M>>Y;
	rate=(100+R)/100.0;
	while(Y--)
		M=M*rate;
	cout<<(int)M<<endl;
	return 0;
}
这样却WA!不解啊?????????


Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator