What is wrong with my problem?I have gotten "wrong answer".This is my code:
#include<stdio.h>
int main()
{
unsigned long x,y,a,b,c,d;
while((scanf("%ld%ld",&x,&y)==2)&&(x!=0 && y!=0))
{
if(x<=999999999 &&y<=999999999)
{
d=0,c=0;
while(x!=0 && y!=0)
{
a=x%10;
b=y%10;
x=x/10;
y=y/10;
if(a ...
Search found 15 matches
- Sat Jun 15, 2002 5:37 am
- Forum: Volume 100 (10000-10099)
- Topic: 10035 - Primary Arithmetic
- Replies: 328
- Views: 101713
- Sat Jun 15, 2002 5:24 am
- Forum: Volume 100 (10000-10099)
- Topic: 10070 - Leap Year or Not Leap Year and ...
- Replies: 233
- Views: 83802
Help problem 10070
What can I do now?Can you give me any idea?
- Sat Jun 08, 2002 6:27 am
- Forum: Volume 1 (100-199)
- Topic: 190 - Circle Through Three Points
- Replies: 126
- Views: 37267
Help problem 190
How can I change +/- sign in this problem? I think,in this problem ( h,k) is the center point. But, sample input and output what is given in the question do not match with your solution. Here is the sample input and output :
Sample input
7.0 -5.0 -1.0 1.0 0.0 -6.0
1.0 7.0 8.0 6.0 7.0 -2.0
Sample ...
Sample input
7.0 -5.0 -1.0 1.0 0.0 -6.0
1.0 7.0 8.0 6.0 7.0 -2.0
Sample ...
- Fri Jun 07, 2002 8:11 am
- Forum: Volume 100 (10000-10099)
- Topic: 10070 - Leap Year or Not Leap Year and ...
- Replies: 233
- Views: 83802
Help problem 10070
Can you tell me what is wrong with my problem code? I get "wrong answer".This is my code:
#include<stdio.h>
int main()
{
unsigned long year;
int c;
while(scanf("%ld",&year)==1)
{
if(year>=2000)
{
c=0;
if(year%4==0 || year%400==0 || year%55==0)
{
printf("This is leap year");
c++;
}
if ...
#include<stdio.h>
int main()
{
unsigned long year;
int c;
while(scanf("%ld",&year)==1)
{
if(year>=2000)
{
c=0;
if(year%4==0 || year%400==0 || year%55==0)
{
printf("This is leap year");
c++;
}
if ...
- Sat Jun 01, 2002 6:44 am
- Forum: Volume 1 (100-199)
- Topic: 190 - Circle Through Three Points
- Replies: 126
- Views: 37267
Help problem 190
I have not understand from your mail.Can you give me clear concept?What will be the center of circle ,if I input following points?
7.0 -5.0 -1.0 1.0 0.0 -6.0 and
1.0 7.0 8.0 6.0 7.0 -2.0
Please show me the calculation.
7.0 -5.0 -1.0 1.0 0.0 -6.0 and
1.0 7.0 8.0 6.0 7.0 -2.0
Please show me the calculation.
- Tue May 28, 2002 7:50 am
- Forum: Volume 1 (100-199)
- Topic: 190 - Circle Through Three Points
- Replies: 126
- Views: 37267
problem 190
Can you tell me, how can I find the center from three points?
- Mon May 27, 2002 7:40 am
- Forum: Volume 1 (100-199)
- Topic: 160 - Factors and Factorials
- Replies: 205
- Views: 45108
thank you
Thank you for helping me to slove the problem 160.
- Sun May 26, 2002 6:49 am
- Forum: Volume 1 (100-199)
- Topic: 160 - Factors and Factorials
- Replies: 205
- Views: 45108
Re: Help
Please help me to solve Problem 160.This is my program code:
#include<stdio.h>
int main()
{
int x[25],p[99],f[10];
int i,y,count=0,n,k=0,l=0,z,j=0;
for(i=2;i<=100;++i)
{
for(y=1;y<=i;++y)
if(i%y==0)
++count;
if(count==2)
{
x[j]=i;
count=0;
++j;
}
else
count=0;
}
while(scanf("%d",&n ...
#include<stdio.h>
int main()
{
int x[25],p[99],f[10];
int i,y,count=0,n,k=0,l=0,z,j=0;
for(i=2;i<=100;++i)
{
for(y=1;y<=i;++y)
if(i%y==0)
++count;
if(count==2)
{
x[j]=i;
count=0;
++j;
}
else
count=0;
}
while(scanf("%d",&n ...
- Thu May 23, 2002 8:45 am
- Forum: Volume 1 (100-199)
- Topic: 160 - Factors and Factorials
- Replies: 205
- Views: 45108
problem 160 code
This is my problem 160 code:
[url]
[c][code][quote]
int main()
{
int x[25],p[99],f[10];
int i,y,count=0,n,k=0,l=0,z,j=0;
for(i=2;i<=100;++i)
{
for(y=1;y<=i;++y)
if(i%y==0)
++count;
if(count==2)
{
x[j]=i;
count=0;
++j;
}
else
count=0;
}
while(scanf("%d",&n)==1 && n!=0)
{
if(n>=2 ...
[url]
[c][code][quote]
int main()
{
int x[25],p[99],f[10];
int i,y,count=0,n,k=0,l=0,z,j=0;
for(i=2;i<=100;++i)
{
for(y=1;y<=i;++y)
if(i%y==0)
++count;
if(count==2)
{
x[j]=i;
count=0;
++j;
}
else
count=0;
}
while(scanf("%d",&n)==1 && n!=0)
{
if(n>=2 ...
- Wed May 22, 2002 8:11 am
- Forum: Volume 1 (100-199)
- Topic: 160 - Factors and Factorials
- Replies: 205
- Views: 45108
problem 160
Can you tell me why I always get "wrong answer"?How can I send you my code ?Please tell me soon.
- Tue May 21, 2002 7:33 am
- Forum: Volume 1 (100-199)
- Topic: 160 - Factors and Factorials
- Replies: 205
- Views: 45108
problem 160
Can you tell me what will be the output, if I input 2 and 1 and do I need to use "FILE" for this program? Please tell me soon.I think my program is right , but the judge's reply is "wrong answer, it ran during 0:10 seconds".What can I do now? [/code][/b][/c]
- Sun May 12, 2002 7:42 am
- Forum: Volume 1 (100-199)
- Topic: 160 - Factors and Factorials
- Replies: 205
- Views: 45108
problem 160
Can you tell me ,what will be output ,if I input 100 and 97? Please tell me soon.
- Fri Apr 19, 2002 6:36 am
- Forum: Volume 1 (100-199)
- Topic: 151 - Power Crisis
- Replies: 56
- Views: 11643
Problem 151
Sir,
I solved my problem & it shows the output for 98- 113 and 67- 82.But when I send it Judge's response is-"wrong answer & it ran during 0.00 seconds".So,what I will do now? Please inform me soon.
[/c]
- Thu Apr 18, 2002 1:13 pm
- Forum: Volume 1 (100-199)
- Topic: 151 - Power Crisis
- Replies: 56
- Views: 11643
151 - Power Crisis
What will be the output for problem no.151 if I input 98 and 67?
Please inform me soon.
- Thu Apr 18, 2002 5:30 am
- Forum: Volume 1 (100-199)
- Topic: 151 - Power Crisis
- Replies: 56
- Views: 11643
problem 151
[/i][/b][/c]What will be output for problem no.151, if I input 20 and 21?Please inform me soon.