Search found 1 match

by zachaakelly
Sat Oct 15, 2011 7:51 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 320785

Re: If you get WA in problem 100, read me before post!

I've been tinkering with this for a while, and I keep getting WA with almost no idea why
[#include <stdio.h>

unsigned int i, j, num1, count, count1;
unsigned int backw = 0;
unsigned long num2;

unsigned long nextnum(int n){
if(n%2==0){
return n/2;
} else{
return 3*n+1;
}
}

int main(void ...

Go to advanced search