結果

問題 No.237 作図可能性
ユーザー GrenacheGrenache
提出日時 2015-07-05 23:50:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 638 bytes
コンパイル時間 3,214 ms
コンパイル使用メモリ 72,388 KB
実行使用メモリ 58,448 KB
最終ジャッジ日時 2023-09-22 08:51:47
合計ジャッジ時間 8,442 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,980 KB
testcase_01 AC 119 ms
56,044 KB
testcase_02 AC 121 ms
55,652 KB
testcase_03 AC 121 ms
55,944 KB
testcase_04 AC 120 ms
56,052 KB
testcase_05 AC 120 ms
56,036 KB
testcase_06 AC 120 ms
56,340 KB
testcase_07 AC 120 ms
56,000 KB
testcase_08 AC 123 ms
56,152 KB
testcase_09 AC 122 ms
56,504 KB
testcase_10 AC 118 ms
56,060 KB
testcase_11 AC 122 ms
56,232 KB
testcase_12 AC 118 ms
56,468 KB
testcase_13 AC 119 ms
56,220 KB
testcase_14 AC 118 ms
56,072 KB
testcase_15 AC 119 ms
55,520 KB
testcase_16 AC 120 ms
56,628 KB
testcase_17 AC 119 ms
55,756 KB
testcase_18 AC 119 ms
55,792 KB
testcase_19 AC 117 ms
56,012 KB
testcase_20 AC 118 ms
55,964 KB
testcase_21 AC 118 ms
56,072 KB
testcase_22 AC 120 ms
56,124 KB
testcase_23 AC 121 ms
56,032 KB
testcase_24 AC 120 ms
55,548 KB
testcase_25 AC 121 ms
56,080 KB
testcase_26 AC 121 ms
58,448 KB
testcase_27 AC 119 ms
55,792 KB
testcase_28 AC 120 ms
55,820 KB
testcase_29 AC 119 ms
55,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder237 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();

        long[] num = {2, 4, 16, 256, 65536, 3, 5, 17, 257, 65537};
        
        int ret = 0;
        for (int i = 1; i < 1 << num.length; i++) {
        	long tmp = 1;
        	for (int j = 0; j < num.length; j++) {
        		if ((i & (0x1 << j)) != 0) {
        			tmp *= num[j];
        		}
        	}
        	if (tmp <= a) {
        		ret++;
        	}
        }
        
        System.out.println(ret - 1);
        
        sc.close();
    }
}
0