結果
問題 | No.237 作図可能性 |
ユーザー |
![]() |
提出日時 | 2020-11-18 08:40:41 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 133 ms / 2,000 ms |
コード長 | 773 bytes |
コンパイル時間 | 2,115 ms |
コンパイル使用メモリ | 74,108 KB |
実行使用メモリ | 54,348 KB |
最終ジャッジ日時 | 2024-07-23 08:51:21 |
合計ジャッジ時間 | 7,334 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 28 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long[] felm = new long[]{3, 5, 17, 257, 65537}; long[] probable = new long[1 << 5]; for (int i = 0; i < (1 << 5); i++) { int x = i; probable[i] = 1; for (int j = 0; j < 5; j++) { if (x % 2 == 1) { probable[i] *= felm[j]; } x /= 2; } } int count = 0; for (long x : probable) { long y = x; while (y <= n) { count++; y *= 2; } } System.out.println(count - 2); } }