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.
hide comments
Aditya Pande:
2013-01-11 18:04:49
just wish i could cut down the last two bytes and equal 36 Last edit: 2013-01-12 07:51:17 |
|
Saurabh Jain:
2013-01-03 04:23:14
@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 ..!!
|
|
Mostafa 36a2:
2013-01-03 04:23:14
@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 |
|
Saurabh Jain:
2013-01-03 04:23:14
@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 ..!!
|
|
Aditya Pande:
2013-01-03 04:23:14
|
|
Robert Gerbicz:
2013-01-03 04:23:14
"that should not make a difference to your submission" it is not true, in fact it would be tle. |
|
(Tjandra Satria Gunawan)(曾毅昆):
2013-01-03 04:23:14
@Mitch Schwartz: Thank you very much for your submission to my problem: BFTRI, It give me 'crazy' idea to solve this problem ;-) |
|
Aditya Pande:
2013-01-03 04:23:14
@Robert: that should not make a difference to your submission
|
|
Robert Gerbicz:
2013-01-03 04:23:14
You write: "a and b are one_digit_numbers {1,2,3,...,8,9}"
|
|
Mostafa 36a2:
2013-01-03 04:23:14
Rejudge has been Done ...
|
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 ^_^ |