結果
| 問題 |
No.237 作図可能性
|
| コンテスト | |
| ユーザー |
hadrori
|
| 提出日時 | 2015-07-26 23:09:12 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 565 bytes |
| コンパイル時間 | 1,364 ms |
| コンパイル使用メモリ | 163,508 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-16 00:19:41 |
| 合計ジャッジ時間 | 2,261 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 28 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:21:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
21 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long i64;
int n;
vector<int> xs;
int solve() {
for (i64 a = 1; a <= n; a*=2)
for (i64 b = 1; b <= 3; b*=3)
for (i64 c = 1; c <= 5; c*=5)
for (i64 d = 1; d <= 17; d*=17)
for (i64 e = 1; e <= 257; e*=257)
for (i64 f = 1; f <= 65537; f*=65537)
if(a*b*c*d*e*f <= n) xs.push_back(a*b*c*d*e*f);
sort(begin(xs),end(xs));
xs.erase(unique(begin(xs),end(xs)),end(xs));
return xs.size()-2;
}
int main() {
scanf("%d", &n);
cout << solve() << endl;
return 0;
}
hadrori