| ||||||||||
| 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 | |||||||||
点解啊?大牛....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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator