提出 #42336932


ソースコード 拡げる

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);
		}
	}
}

提出情報

提出日時
問題 B - Base 2
ユーザ kmatsu
言語 Java (OpenJDK 11.0.6)
得点 200
コード長 431 Byte
結果 AC
実行時間 178 ms
メモリ 36232 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 2
AC × 14
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
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