10055 - Hashmat the Brave Warrior
Moderator: Board moderators
10055 - WA
Code: Select all
#include <stdio.h>
long long int a, b;
int main(){
while(scanf("%lld%lld", &a, &b)==2)
if(a>b)printf("%lld\n", a - b);
else printf("%lld\n", b - a);
}
First thing is dont open a new thread if one (at least) already exists.
And second thing is there is no error in the code (1 warning). So, it should get accepted. Make sure that you are submitting it correctly.
And second thing is there is no error in the code (1 warning). So, it should get accepted. Make sure that you are submitting it correctly.
Ami ekhono shopno dekhi...
HomePage
HomePage
-
- Experienced poster
- Posts: 162
- Joined: Thu Jul 13, 2006 7:07 am
- Location: Campus Area. Dhaka.Bangladesh
- Contact:
Code: Select all
deleted
Last edited by newton on Sat Jul 14, 2007 1:10 pm, edited 2 times in total.
newton wrote:hey man that is your 1st submission. nothing to worry about it.
try to change the condition totoCode: Select all
while(scanf(%lld %lld,&a,&b)==2)
Code: Select all
while(scanf(%ld %ld ,&a ,&b)!=EOF)
Code: Select all
while(scanf(%lld %lld,&a,&b)==2)
Ami ekhono shopno dekhi...
HomePage
HomePage
10055 in Pascal WA
Would anyone tell me that what's wrong with my code?
Code: Select all
program VolumeC_10055;
var n1,n2:longword;
begin
readln(n1,n2);
writeln(abs(n1-n2));
eof(input)
end.
-
- New poster
- Posts: 1
- Joined: Sat Dec 30, 2006 8:40 am
- Location: 2-H/9-17 Dhaka Bangladesh
- Contact:
10055
/*10055*/
#include<stdio.h>
void main(){
long h,o;
while(scanf("%ld %ld",&h,&o)!=EOF){
printf("%ld\n",o-h);}
}
I do not find my mistake.
please help me
e-mail: hasibul2363@yahoo.com
#include<stdio.h>
void main(){
long h,o;
while(scanf("%ld %ld",&h,&o)!=EOF){
printf("%ld\n",o-h);}
}
I do not find my mistake.
please help me
e-mail: hasibul2363@yahoo.com
Last edited by hasibul_DIU on Wed Mar 28, 2007 11:12 am, edited 1 time in total.
Search your peoblem first. Dont open a new thread if one already exists.
Ami ekhono shopno dekhi...
HomePage
HomePage
-
- New poster
- Posts: 7
- Joined: Mon Mar 05, 2007 3:24 pm
HELP !I STILL GOT A WA!
int main()
{
long long int num1 ,num2,answer;
while(scanf("%lld %lld",&num1,&num2) != EOF)
{
if(num1 > num2)
{
answer = num1 - num2;
printf("%lld\n",answer);
}
else
{
answer = num2 - num1;
printf("%lld\n",answer);
}
}
return 0;
}
I wrote this in C!
why I still got a WA~?
thx!![:o](./images/smilies/icon_eek.gif)
{
long long int num1 ,num2,answer;
while(scanf("%lld %lld",&num1,&num2) != EOF)
{
if(num1 > num2)
{
answer = num1 - num2;
printf("%lld\n",answer);
}
else
{
answer = num2 - num1;
printf("%lld\n",answer);
}
}
return 0;
}
I wrote this in C!
why I still got a WA~?
thx!
![:o](./images/smilies/icon_eek.gif)
-
- Learning poster
- Posts: 62
- Joined: Sun Jul 09, 2006 8:31 am
- Location: University of Dhaka
- Contact:
10055 how can i!
how can i lessen my run time and use of memory. in this problem it use 1.146..