結果

問題 No.237 作図可能性
ユーザー ぴろずぴろず
提出日時 2015-07-05 22:32:40
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 519 bytes
コンパイル時間 4,015 ms
コンパイル使用メモリ 73,228 KB
実行使用メモリ 58,432 KB
最終ジャッジ日時 2023-09-22 06:31:07
合計ジャッジ時間 8,832 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 119 ms
55,736 KB
testcase_02 AC 118 ms
53,720 KB
testcase_03 AC 119 ms
55,520 KB
testcase_04 AC 121 ms
55,904 KB
testcase_05 AC 121 ms
55,712 KB
testcase_06 AC 120 ms
55,480 KB
testcase_07 AC 120 ms
55,708 KB
testcase_08 AC 120 ms
55,724 KB
testcase_09 AC 122 ms
55,984 KB
testcase_10 AC 123 ms
55,704 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 119 ms
55,708 KB
testcase_14 AC 118 ms
56,012 KB
testcase_15 WA -
testcase_16 AC 121 ms
53,660 KB
testcase_17 AC 121 ms
55,992 KB
testcase_18 AC 122 ms
55,792 KB
testcase_19 AC 121 ms
55,684 KB
testcase_20 WA -
testcase_21 AC 121 ms
54,012 KB
testcase_22 AC 121 ms
55,880 KB
testcase_23 AC 119 ms
55,620 KB
testcase_24 WA -
testcase_25 AC 121 ms
55,892 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 120 ms
53,792 KB
testcase_29 AC 120 ms
55,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no237;

import java.util.HashSet;
import java.util.Scanner;

public class Main {
	public static long[] felmatPrime = {3,5,17,257,65537};
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		HashSet<Long> hs = new HashSet<>();
		for(int i=0;i<32;i++) {
			long x = 1;
			for(int j=0;j<5;j++) {
				if ((i >> j & 1) == 1) {
					x *= felmatPrime[j];
				}
			}
			while(x < a) {
				hs.add(x);
				x <<= 1;
			}
		}
		System.out.println(hs.size() - 2);
	}

}
0