Search found 1 match

by fiamma
Fri Mar 20, 2015 7:01 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318784

Re: 100 - The 3n + 1 problem

i got time exceeded error, anyone know how can i reduce this time?


#include <stdio.h>
void swap( long int* x, long int* y)
{
long int temp;

temp = *x;
*x = *y;
*y = temp;
}
int main(){
long int i,j, act_value, aux, count, max;
while (scanf("%d %d" , &i, &j) != EOF){
max=0;
printf("%d ...

Go to advanced search