#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
#include<string>
#include<vector>
#include<stack>
#include<bitset>
#include<cstdlib>
#include<cmath>
#include<set>
#include<list>
#include<deque>
#include<map>
#include<queue>
using namespace std;
typedef long long ll;
const double PI = acos(-1.0);
const int INF = 1000000000;
const int maxn = 100005;

int main()
{
    int T;
    int n;
    int  d = 0;
    ll a[maxn];
    memset(a, 0, sizeof(a));
    for(int i = 0; i <= 32; i++)
        for(int j = 0; j <= 19; j++)
            for(int k = 0; k <= 12; k++)
                for(int l = 0; l <= 11; l++)
    {
        ll s = pow(2,i)*pow(3,j)*pow(5,k)*pow(7,l);
        if(s > 0 && s < 1e9+7)
            a[d++] = s;
        else break;
    }
    sort(a, a+d);
    cin >> T;
    while(T--)
    {

scanf("%d",&n); // 大量输入, 不能用cin
    //  int x= *lower_bound(a,a+d,n); // lower_bound 要用引用;
    printf("%lld\n",*lower_bound(a,a+d,n));
  //  printf("%lld\n", x);

}

return 0;
}

最新文章

  1. 吉特仓库管理系统-.NET打印问题总结
  2. cocos2d-x 常用UI
  3. 转:Configure your eclipse for C++
  4. 基于 REST 的 Web 服务:基础
  5. linux rc.sysinit文件详解
  6. SharePoint 2010 中创建超链接到Pop-Up对话框
  7. 正则API
  8. IntelliJ IDEA环境配置
  9. 章节十、6-CSS---用CSS 定位子节点
  10. 使用genism训练词向量【转载】
  11. Redis 的安装 使用 通知事件
  12. 在HTML中用循环语句
  13. CentOS 7使用yum安装MYSQL
  14. topcoder srm 712 div1
  15. Android自定义View学习(四)
  16. System.net.mail 腾讯ssl发送邮件超时
  17. AppBox下调用HighCharts画曲线
  18. docker问题
  19. gcc 与 g++的区分较
  20. 【Hadoop】用web查看hadoop运行状态

热门文章

  1. LoadRunner录制脚本-基础
  2. Java之旅_面向对象_重写和重载
  3. Java基础知识之集合
  4. 洛谷P3193 [HNOI2008]GT考试 kmp+dp
  5. MySQL分支Percona
  6. 多线程之共享变量.md
  7. vue-element分页
  8. [Shapefile C Library]读写shp图形(C++&amp;.net Wapper)
  9. boost生成json
  10. 静态文件link 数据库迁移命令 新建app命令