Search found 1 match

by pk__modi
Mon Aug 01, 2016 8:25 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318253

Re: 100 - The 3n + 1 problem

someone plz help why am i getting TLE:

#include<iostream>
#include<cstdio>
#include<cstdlib>

#define max(a,b) ((a>b)?a:b)
#define min(a,b) ((a<b)?a:b)

int main()
{
int i,j,min,max,maximum=0;
while(scanf("%d%d",&i,&j))
{ max=max(i,j);
min=min(i,j);
maximum=0;
while(min<=max)
{
int count=1 ...

Go to advanced search