結果
| 問題 | No.237 作図可能性 |
| コンテスト | |
| ユーザー |
tetsuzuki1115
|
| 提出日時 | 2018-03-15 19:06:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 735 bytes |
| コンパイル時間 | 780 ms |
| コンパイル使用メモリ | 84,936 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-18 00:21:41 |
| 合計ジャッジ時間 | 2,003 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 28 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <cmath>
#include <limits.h>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <functional>
#include <stdio.h>
using namespace std;
long long MOD = 1000000007;
long long A;
long long f[5] = { 3,5,17,257,65537 };
int func( long long a, int i ) {
if ( a > A ) { return 0; }
if ( i == 5 ) { return ( a >= 3 ? 1 : 0); }
return func( a*f[i], i+1 ) + func( a, i+1 );
}
int main() {
cin >> A;
long long a = 1;
int ans = 0;
while ( true ) {
if ( a > A ) { break; }
ans += func( a, 0 );
a *= 2;
}
cout << ans << endl;
return 0;
}
tetsuzuki1115