Cualquier duda no dudes en contactar.
#include <bits/stdc++.h>
#define INF 0x3F3F3F3F
using namespace std;
/*
bool simp(int a)
{
while(a%2==0) a>>=1;
while(a%3==0) a/=3;
while(a%5==0) a/=5;
return a==1;
}
int main()
{
//freopen("C:/Users/Isaac/Documents/QT/Entregar/in.txt","r",stdin);
//freopen("C:/Users/Isaac/Documents/QT/Entregar/out.txt","w",stdout);
int u=0,n=0;
for(int i=1;i<INF && u<1500;i++)
{
if(simp(i)) { n=i; u++; }
}
cout<<"The 1500'th ugly number is "<<n<<'\n';
return 0;
}*/
int main()
{
cout<<"The 1500'th ugly number is 859963392.\n";
return 0;
}
Sigue en contacto con Isaac Lozano Osorio!