I tried all possible test cases and It outputed the correct answer , I wonder why UVA doesn't accept my answer
<#include<iostream>
#include <stdio.h>
using namespace std;
int main()
{
int i, j;
unsigned long long int tempI, tempJ;
int maxCaseLen = 1;
int count = 1;
while (scanf("%d %d", &i, &j) == 2)
{
if (i>j)
{
tempI = j;
tempJ = i;
}
else
{
tempI = i;
tempJ = j;
}
int iTemp = tempI;
while (iTemp <= tempJ)
{
unsigned long long int n = iTemp;
while (n != 1)
{
if (n % 2 == 1)
{
n = 3 * n + 1;
}
else
{
n = n / 2;
}
count++;
}
if (maxCaseLen < count)
{
maxCaseLen = count;
count = 1;
}
else
count = 1;
iTemp++;
}
printf("%d %d %d", i, j, maxCaseLen);
}
return 0;
}
/>