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 mtom at 2005-04-01 20:34:38 on Problem 2390
import java.io.*;
	import java.util.*;
	public class Main {
		public static void main(String [] args) throws IOException {
			BufferedReader in = new BufferedReader(
														new InputStreamReader(
															System.in));
			StringTokenizer st = new StringTokenizer(in.readLine()); 												
			int a = Integer.parseInt(st.nextToken());
			int b = Integer.parseInt(st.nextToken());
			int c = Integer.parseInt(st.nextToken());
			double f = (double)b;
			int cnt = 0;
			while(cnt++ < c) {
				f = f*(1+(double)a/(double)100);
				}
			System.out.println(f);	
			String k = Double.toString(f);	
			for(int ii=0;ii<k.length();ii++) {
				if((k.charAt(ii) == '.')) break;
			 System.out.print(k.charAt(ii));
				}
			}
		}

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