Submit | All submissions | Best solutions | Back to list |
TSET - "If Equal" in BF |
your task is simple... you will read tow numbers a,b then print 1 if a==b or print 0 if a!=b
a and b are one_digit_numbers {0,1,2,3,4,5,6,7,8,9}.
NOTE : The Only Available language For This Problem Is BrainF***.
Input
there are 10 test cases ... in each one there is:
one_digit_number a
followed by space
then one_digit_number b
followed by end_of_line charachter
Output
the logic value of a==b
Example
Input:
4 7
8 8
9 7
0 1
..
Output:
0
1
0
0
..
Score is your Code Length.
Added by: | Mostafa 36a2 |
Date: | 2012-12-16 |
Time limit: | 1s |
Source limit: | 250B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | BF |
Resource: | BF it self ^_^ |
hide comments
|
|||||
2013-01-11 18:04:49 Aditya Pande
just wish i could cut down the last two bytes and equal 36 Last edit: 2013-01-12 07:51:17 |
|||||
2013-01-03 04:23:14 Saurabh Jain
@Mostafa 36a2: got AC..:) thnx for suggestion although I still can't figure it out why it was giving the wrong answer earlier..:P btw nice problem made ..!! --ans-- still can't figure it ? Whisper:(don't forget \n:) Last edit: 2012-12-26 18:56:17 |
|||||
2013-01-03 04:23:14 Mostafa 36a2
@Sakiv : remember to print any space after every output...and take care when using [-] it's cause TLE when the value<0 Last edit: 2012-12-26 05:17:24 |
|||||
2013-01-03 04:23:14 Saurabh Jain
@Mostafa 36a2: Could you plz look at my last submission ? getting WA even though my code gives the right answer for all possible test cases ..!! --ans--: Yes there is a little tiny mistake :) your code print the ASCII(1) after the last output... best wishes:) Last edit: 2012-12-26 05:08:48 |
|||||
2013-01-03 04:23:14 Aditya Pande
finally under 40B i have started from the last, got to the first , back to the last and now atleast i m not in the last edit2: is there anything to loop until eof? or just tell me the value of eof that u are using. -->EOF=-1 --->thank you Last edit: 2012-12-24 14:51:08 |
|||||
2013-01-03 04:23:14 Robert Gerbicz
"that should not make a difference to your submission" it is not true, in fact it would be tle. |
|||||
2013-01-03 04:23:14 (Tjandra Satria Gunawan)(曾毅昆)
@Mitch Schwartz: Thank you very much for your submission to my problem: BFTRI, It give me 'crazy' idea to solve this problem ;-) |
|||||
2013-01-03 04:23:14 Aditya Pande
@Robert: that should not make a difference to your submission edit: you getting TLE means we are doing it very differently. my algo though long is very robust Last edit: 2012-12-21 12:16:13 |
|||||
2013-01-03 04:23:14 Robert Gerbicz
You write: "a and b are one_digit_numbers {1,2,3,...,8,9}" but one of the sample input is a=0 b=1, that should be invalid. So can we assume that a,b comes from {1,2,...8,9} or from {0,1,2,...,8,9} ? Edit:Yes you are right... Sorry for this ...it's been corrected. Last edit: 2012-12-21 11:57:31 |
|||||
2013-01-03 04:23:14 Mostafa 36a2
Rejudge has been Done ... Sorry For @Aditya Pande .. you should try defeate @Mitch Schwartz again:p Thanks @Robert Gerbicz for help :) also thank you @Tjandra Satria Gunawan GO Challenge ! |