https://www.lydsy.com/JudgeOnline/problem.php?id=1053
这道题不同于前边的那道题
但是整体的思想都是一样的
就是搜索
AC代码:
#include
using namespace std;
typedef long long ll;
ll p[20]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53};
const ll inf =1e18;
ll ansa,ansb;
ll n;
void dfs(ll deep,ll tmp,ll num){
if(tmp>n) return;
if(num>ansa) ansa=num,ansb=tmp;
if(num==ansa&&tmp>n;
ansa=1;
ansb=1;
dfs(0,1,1);
cout<