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_12663689_10485\Main.java:1: 进行语法解析时已到达文件结尾
import java.math.BigInteger;import java.util.Scanner;public class Main{ public static void main(String[] args) {  Scanner in = new Scanner(System.in);  int a, b;  int n;  while (in.hasNext()) {   a = in.nextInt();   b = in.nextInt();   n = in.nextInt();   // 1 <= A, B <= 1000, 1 <= n <= 100,000,000   if (a < 1 && a > 1000 && b < 1 && b > 1000 && b < 1 && a > 100000000)    System.exit(0);   if (a == 0 & b == 0 & n == 0)    System.exit(0);   BigInteger f[] = new BigInteger[n];   f[0] = BigInteger.valueOf(1);   f[1] = BigInteger.valueOf(1);   for (int i = 2; i < f.length; i++) {    f[i] = (f[i - 1].multiply(BigInteger.valueOf(a)).add(f[i - 2]      .multiply(BigInteger.valueOf(b)))).remainder(BigInteger      .valueOf(7));    //f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.   }   System.out.println(f[n - 1]);  } }}


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.001000(s) query 1, Server time : 2025-01-17 15:23:29, Gzip enabled