I've modified my code:
#include<stdio.h>
#include<stdlib.h>
long function(long k);
int count;
void main()
{
long m,n,temp,maxCount,tempCount;
long i;
while(scanf("%ld %ld",&n,&m)!=0)
{ if(n>m)
{
temp=n;
n=m;
m=temp;
}
maxCount=function(n);
for(i=n+1;i<=m;i++)
{
tempCount ...
Search found 4 matches
- Sun Jun 27, 2004 11:33 am
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 317957
- Sat Jun 26, 2004 1:00 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 317957
- Sat Jun 26, 2004 10:16 am
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 317957
What's wrong in it? prob 100
Everytime i'm receiving this Wrong Answer reply including
"Your program has not solved the problem. It ran during 0.002 seconds."
#include<stdio.h>
#include<stdlib.h>
int function(int k);
int count;
void main()
{
int m,n,i,temp,maxCount,tempCount;
scanf("%d %d",&n,&m);
if(n>m)
{
temp ...
"Your program has not solved the problem. It ran during 0.002 seconds."
#include<stdio.h>
#include<stdlib.h>
int function(int k);
int count;
void main()
{
int m,n,i,temp,maxCount,tempCount;
scanf("%d %d",&n,&m);
if(n>m)
{
temp ...
- Sat Jun 26, 2004 10:15 am
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 317957
What's wrong in it?
Everytime i'm receiving this Wrong Answer reply including
"Your program has not solved the problem. It ran during 0.002 seconds."
#include<stdio.h>
#include<stdlib.h>
int function(int k);
int count;
void main()
{
int m,n,i,temp,maxCount,tempCount;
scanf("%d %d",&n,&m);
if(n>m)
{
temp ...
"Your program has not solved the problem. It ran during 0.002 seconds."
#include<stdio.h>
#include<stdlib.h>
int function(int k);
int count;
void main()
{
int m,n,i,temp,maxCount,tempCount;
scanf("%d %d",&n,&m);
if(n>m)
{
temp ...