[Offer收割]编程练习赛12 register

Ended

Participants:1323

Verdict:Time Limit Exceeded
Score:40 / 100
Submitted:2017-04-02 13:25:02

Lang:Java

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import java.math.BigInteger;
import java.util.*;
public class Main {
    public Main() {
        Scanner in = new Scanner(System.in);
        int T = in.nextInt();
        int N;
        for (int i = 0i < Ti++) {
            N = in.nextInt();
            in.nextLine();
            String string = in.nextLine();
            String[] strings = string.split(" ");
            BigInteger[] A = new BigInteger[strings.length];
            for (int j = 0j < strings.lengthj++) {
                A[j= new BigInteger(strings[j]);
            }
            System.out.println(process(A));
        }
        return;
    }
    public String process(BigInteger A[]) {
        BigInteger result = new BigInteger("0");
        for (int i = 0i < A.lengthi++) {
            for (int j = 0j < A.lengthj++) {
                if (i == j) {
                    continue;
                }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX