結果

問題 No.237 作図可能性
ユーザー sggkshio
提出日時 2019-10-05 12:00:44
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 789 bytes
コンパイル時間 722 ms
コンパイル使用メモリ 83,936 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-05 12:17:59
合計ジャッジ時間 1,706 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include  <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string>
#include<math.h>
#include<iomanip>
#include<stdio.h>
#include <stdlib.h>
#include<stdio.h>
#include <queue>
#include<map>
#include <sstream>
#include<set>
#include<stack>

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


using namespace std;



int main() {


	int n;
	cin >> n;

	long long int p[5] = { 3,5,17,257,65537 };
	long long int ans = 0;
	for (long long int i = 0; i < (1 << 5); i++) {
		long long int t = 1;
//		cout<<i<<endl;
		for (int j = 0; j < 5; j++) {//cout<<(1<<j)<<" ";
			if (i & (1 << j))t *= p[j];
			
		}
	//	cout << endl;
		for (long long j = t; j <= n; j <<= 1){
			if(j>=3)ans++;
			//cout << t;;
		}
	}
	cout << ans << endl;

	return 0;




}
0