結果
問題 | No.237 作図可能性 |
ユーザー |
![]() |
提出日時 | 2015-07-26 23:08:50 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 688 bytes |
コンパイル時間 | 1,679 ms |
コンパイル使用メモリ | 164,632 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-16 00:19:38 |
合計ジャッジ時間 | 2,756 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 28 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:26:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 26 | scanf("%d", &n); | ~~~~~^~~~~~~~~~
ソースコード
#include <bits/stdc++.h> using namespace std; #define repi(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define rep(i,n) repi(i,0,n) const int fm[] = {3,5,17,257,65537}; 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; }