F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_3108251_27944\Main.java:1: 类 hdu_1316 是公共的,应在名为 hdu_1316.java 的文件中声明
import java.io.*;import java.util.*;import java.math.*;public class hdu_1316 {public static void main(String[] args){int maxn=505;BigInteger []arr=new BigInteger[maxn];BigInteger a,b;arr[1]=BigInteger.valueOf(1);arr[2]=BigInteger.valueOf(2);for(int i=3;i<maxn;i++){arr[i]=arr[i-1].add(arr[i-2]);}Scanner cin=new Scanner(System.in);while(cin.hasNextBigInteger()){a=cin.nextBigInteger();b=cin.nextBigInteger();if(a.compareTo(BigInteger.ZERO)==0 && b.compareTo(BigInteger.ZERO)==0) break;int cnt=0;for(int i=1;i<maxn;i++){if(arr[i].compareTo(b)>0) break;if(arr[i].compareTo(a)>=0 && arr[i].compareTo(b)<=0) cnt++;}System.out.println(cnt);}}}


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-17 09:42:16, Gzip enabled