hdu 5878】的更多相关文章

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5878 题目大意: 给出一个数n ,求一个数X, X>=n. X 满足一个条件 X= 2^a*3^b*5^c*7^d 求靠近n的X值. 解题思路: 打表+二分查找 [切记用 cin cout,都是泪...] AC Code: #include<bits/stdc++.h> using namespace std; ]; int main() { ; long long ans,n,x; ; i…
题目链接 题意:给定一个数n,求大于n的第一个只包含2357四个因子的数(但是不能不包含其中任意一种),求这个数. 题解:打表+二分即可. #include <iostream> #include <math.h> #include <stdio.h> #include<algorithm> using namespace std; ],tot=; int main() { ; long long a,b,c,d; ;a<=maxn;a*=) ;a*b…
I Count Two Three Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 767    Accepted Submission(s): 403 Problem Description I will show you the most popular board game in the Shanghai Ingress Resis…
为甚么16年Qingdao Online 都是暴力题emm///... 先暴力预处理 然后lower _bound二分 #include <iostream> #include <cstdio> #include <sstream> #include <cstring> #include <map> #include <cctype> #include <set> #include <vector> #incl…
I Count Two Three 31.1% 1000ms 32768K   I will show you the most popular board game in the Shanghai Ingress Resistance Team. It all started several months ago. We found out the home address of the enlightened agent Icount2three and decided to draw hi…
I Count Two Three Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2719    Accepted Submission(s): 1177 Problem Description I will show you the most popular board game in the Shanghai Ingress Res…
题意:给出一个整数nnn, 找出一个大于等于nnn的最小整数mmm, 使得mmm可以表示为2a3b5c7d2^a3^b5^c7^d2​a​​3​b​​5​c​​7​d​​. 析:预处理出所有形为2a3b5c7d2^a3^b5^c7^d2​a​​3​b​​5​c​​7​d​​即可, 大概只有5000左右个.然后用二分查找就好. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio…
I will show you the most popular board game in the Shanghai Ingress Resistance Team. It all started several months ago. We found out the home address of the enlightened agent Icount2three and decided to draw him out. Millions of missiles were detonat…
[ HDU 5878 ] I Count Two Three 考虑极端,1e9就是2的30次方,3的17次方,5的12次方,7的10次方. 而且,不超过1e9的乘积不过5000多个,于是预处理出来,然后每次二分找就可以了. /* TASK:I Count Two Three 2^a*3^b*5^c*7^d的最小的大于等于n的数是多少 LANG:C++ URL:http://acm.hdu.edu.cn/showproblem.php?pid=5878 */ #include <iostream>…
Saving HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7194    Accepted Submission(s): 3345 Problem Description 话说上回讲到海东集团面临内外交困,公司的元老也只剩下XHD夫妇二人了.显然,作为多年拼搏的商人,XHD不会坐以待毙的.  一天,当他正在苦思冥想解困良策的…