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_11350623_22701\Main.java:18: 无法将 java.math.BigInteger 中的 mod(java.math.BigInteger) 应用于 (int)
        if(n.mod(2).equals(BigInteger.ZERO))return TWO.multiply(solve(n.divide(TWO),k+1)).add(n.add(BigInteger.ONE).multiply(BigInteger.ONE.shiftLeft(k)));
            ^
0_0_11350623_22701\Main.java:18: 无法从静态上下文中引用非静态 变量 TWO
        if(n.mod(2).equals(BigInteger.ZERO))return TWO.multiply(solve(n.divide(TWO),k+1)).add(n.add(BigInteger.ONE).multiply(BigInteger.ONE.shiftLeft(k)));
                                                                               ^
0_0_11350623_22701\Main.java:18: 无法从静态上下文中引用非静态 变量 TWO
        if(n.mod(2).equals(BigInteger.ZERO))return TWO.multiply(solve(n.divide(TWO),k+1)).add(n.add(BigInteger.ONE).multiply(BigInteger.ONE.shiftLeft(k)));
                                                   ^
0_0_11350623_22701\Main.java:19: 无法从静态上下文中引用非静态 变量 TWO
        else return solve(n.divide(TWO),k+1)+solve(n.divide(TWO).subtract(BigInteger.ONE),k+1);
                                   ^
0_0_11350623_22701\Main.java:19: 无法从静态上下文中引用非静态 变量 TWO
        else return solve(n.divide(TWO),k+1)+solve(n.divide(TWO).subtract(BigInteger.ONE),k+1);
                                                            ^
0_0_11350623_22701\Main.java:19: 运算符 + 不能应用于 java.math.BigInteger,java.math.BigInteger
        else return solve(n.divide(TWO),k+1)+solve(n.divide(TWO).subtract(BigInteger.ONE),k+1);
                                            ^
6 错误


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-01 01:34:40, Gzip enabled