結果

問題 No.237 作図可能性
ユーザー 37kt_37kt_
提出日時 2015-09-10 18:48:40
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 955 bytes
コンパイル時間 1,459 ms
コンパイル使用メモリ 150,684 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-26 10:26:04
合計ジャッジ時間 3,052 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 1 ms
4,376 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 1 ms
4,380 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 AC 2 ms
4,380 KB
testcase_20 AC 1 ms
4,376 KB
testcase_21 AC 2 ms
4,384 KB
testcase_22 AC 2 ms
4,380 KB
testcase_23 AC 1 ms
4,380 KB
testcase_24 AC 2 ms
4,376 KB
testcase_25 AC 2 ms
4,376 KB
testcase_26 AC 2 ms
4,380 KB
testcase_27 AC 2 ms
4,376 KB
testcase_28 AC 2 ms
4,376 KB
testcase_29 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// BCC
/*
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
#include <queue>
*/

// GCC
#include <bits/stdc++.h>

using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = (int)(n) - 1; i >= 0; i--)
#define each(i, c) for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define chmin(a, b) a = min(a, b)
#define chmax(a, b) a = max(a, b)
#define pb push_back
#define mp make_pair

typedef long long ll;

const int INF = 1 << 28;
const ll INFLL = 1ll << 56;


int main()
{
	vector<ll> table = {3, 5, 17, 257, 65537};
	vector<ll> v;
	
	ll a;
	scanf("%lld", &a);
	
	for (ll x = 1; x <= (ll)1e9; x <<= 1){
		rep(bit, 1 << 5){
			ll y = x;
			rep(i, 5){
				if (bit & (1 << i)){
					y *= table[i];
				}
			}
			if (3 <= y && y <= a) v.pb(y);
		}
	}
	
	sort(begin(v), end(v));
	v.erase(unique(begin(v), end(v)), end(v));
	
	printf("%d\n", v.size());
}
0