Search found 3 matches

by DarkX2
Wed Feb 28, 2007 2:18 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 320200

Well,

I tried it, but it didn't change anything.

Working just with Int does not work, at least not with Visual Studio 6
by DarkX2
Wed Feb 28, 2007 11:18 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 320200

With this new code, I receive the same anwsers as statefull's had tested before -with the exception of the 787843 case, that seems not to finish...


#include <stdio.h>

using namespace std;




int main()
{
unsigned long int i, j, n;
while (scanf("%ld %ld",&i,&j)==2)
{
unsigned long int hi, hj ...
by DarkX2
Wed Feb 28, 2007 9:30 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 320200

Well,

I'm trying to figure out, why this is always giving me a WA:


#include <iostream>

using namespace std;




int main()
{
long i, j, n;
while (cin >> i >> j)
{
long hi, hj;
long max = 0;
if (i > j)
{
hi = j;
hj = i;
}
else
{
hi = i;
hj = j;
}
cout << i << " " << j ...

Go to advanced search