every time i send this program, judge rely that " Wrong Answer". But it run correctly in my computer.can any one tell me what is the problem?
/*@judge_id: 22085KW 100 C */
#include<stdio.h>
int A(unsigned long int x);
void main()
{
int p,i,j,max=0,g,iReal,jReal;
scanf("%d %d\n",&i,&j);
iReal=i ...
Search found 2 matches
- Tue Oct 01, 2002 4:54 am
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 318350
- Mon Sep 30, 2002 8:55 pm
- Forum: C
- Topic: Scan of input file ....
- Replies: 14
- Views: 13587
3n+1 problem
my program gets the reply " Wrong answer". but it run correctly on my computer.
/*@judge_id: 22085KW 100 C */
#include<stdio.h>
int A(unsigned long int x);
void main()
{
int p,i,j,max=0,g,iReal,jReal;
scanf("%d %d\n",&i,&j);
iReal=i;jReal=j;
if (i>j)
{g=i;i=j;j=g;}
for (g=i;g<j+1;g++)
{
p=A(g ...
/*@judge_id: 22085KW 100 C */
#include<stdio.h>
int A(unsigned long int x);
void main()
{
int p,i,j,max=0,g,iReal,jReal;
scanf("%d %d\n",&i,&j);
iReal=i;jReal=j;
if (i>j)
{g=i;i=j;j=g;}
for (g=i;g<j+1;g++)
{
p=A(g ...