結果
問題 |
No.237 作図可能性
|
ユーザー |
![]() |
提出日時 | 2015-06-30 20:34:17 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 368 bytes |
コンパイル時間 | 1,003 ms |
コンパイル使用メモリ | 158,528 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-07 21:30:00 |
合計ジャッジ時間 | 1,988 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 28 |
ソースコード
#include <bits/stdc++.h> using namespace std; const int M = 5; long F[M] = {3, 5, 17, 257, 65537}; int main(){ long N; cin >> N; int ans = 0; for(int mask = 0; mask < 1<<M; mask++){ long x = 1; for(int i = 0; i < M; i++){ if(mask >> i & 1){ x *= F[i]; } } while(x <= N){ if(x >= 3){ ans++; } x *= 2; } } cout << ans << endl; }