题目描述:
反素数就是满足对于任意i(0<i<x),都有g(i)<g(x),(g(x)是x的因子个数),则x为一个反素数。现在给你一个整数区间[a,b],请你求出该区间的x使g(x)最大。
输入描述:
第一行输入n,接下来n行测试数据
输入包括a,b, 1<=a<=b<=5000,表示闭区间[a,b].
输出描述:
输出为一个整数,为该区间因子最多的数.如果满足条件有多个,则输出其中最小的数.
输入:
3
2 3
1 10
47 359
输出:
2
6
240
题意:
字面意思
题解:
找因子最多的那个数
代码:
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
using namespace std;
const int maxn =