Submission #42336932


Source Code Expand

import java.math.BigDecimal;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			BigDecimal result = BigDecimal.ZERO;
			for (int i = 0; i < 64; i++) {
				int a = scanner.nextInt();
				if (a == 0) {
					continue;
				}
				result = result.add(BigDecimal.valueOf(2).pow(i));
			}

			System.out.println(result);
		}
	}
}

Submission Info

Submission Time
Task B - Base 2
User kmatsu
Language Java (OpenJDK 11.0.6)
Score 200
Code Size 431 Byte
Status AC
Exec Time 178 ms
Memory 36232 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 14
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt
All 00_sample_00.txt, 00_sample_01.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 02_same_00.txt, 02_same_01.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 178 ms 35916 KiB
00_sample_01.txt AC 109 ms 35784 KiB
01_random_00.txt AC 112 ms 36232 KiB
01_random_01.txt AC 121 ms 35868 KiB
01_random_02.txt AC 117 ms 36084 KiB
01_random_03.txt AC 115 ms 36028 KiB
01_random_04.txt AC 109 ms 35792 KiB
01_random_05.txt AC 111 ms 35996 KiB
01_random_06.txt AC 107 ms 36036 KiB
01_random_07.txt AC 115 ms 35980 KiB
01_random_08.txt AC 108 ms 35876 KiB
01_random_09.txt AC 109 ms 35920 KiB
02_same_00.txt AC 112 ms 36064 KiB
02_same_01.txt AC 108 ms 35872 KiB