int main() {
	srand(time(NULL));

    int a;
    while(cin>>a) cout<<nthUglyNumber(a)<<endl<<endl;



    return 0;
}
Beispiel #2
0
int main(void)
{
    int n;

    printf("Please input the number:");
    scanf("%d",&n);

    printf("n-th number is %d.\n",nthUglyNumber(n));

    return 0;
}
Beispiel #3
0
// 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 
int main(int argc, char const *argv[])
{
  int i, n;

  // n = atoi(argv[1]);
  n = 10;
  for (i = 1; i <= n; ++i)
    printf("%d ", nthUglyNumber(i));

  printf("\n");
  return 0;
}
Beispiel #4
0
int main()
{
	int result = nthUglyNumber(10);
	return 0;
}
Beispiel #5
0
int main(void){
	int k;
	while(scanf("%d",&k)!=EOF){
		printf("%d\n",nthUglyNumber(k));
	}
}
Beispiel #6
0
int main() {
  nthUglyNumber(20);
  return 0;
}