Numb3rsProblem code: CE02 |
It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order.
WAP to check that if 2 such numbers have this property
Input:
The first line will consist of the total number of test cases T(1<=T<=10).
The next T lines will consist of one number on each line. This is the number N(1<=N<=100000000).
Output:
For each test case, output a single line which returns 1 if the 2 numbers satisfy the above said conditions and 0 otherwise
Example:
Input:
5
23
45
123
123
1234
123
1223
1222
1223
1234
Output:
0
1
0
0
0
| Author: | cerebration |
| Date Added: | 22-03-2010 |
| Time Limit: | 1 sec |
| Source Limit: | 50000 Bytes |
| Languages: | BF, CLOJ, CPP 4.3.2, F#, GO, JS, PERL6, PRLG, PYTH 3.1.2, TEXT, WSPC |
Comments

Fetching successful submissions

test cases are wrong all
test cases are wrong all output 'd be 0
where to register for this
where to register for this and what is this contest ?
I did not understand the
I did not understand the qns..can somebody please expalin?
@mahesh : the second number
@mahesh : the second number shld contain the xact digits the xact no of times as in the first number.. but the order can be changed!! :)
why wrong answer is coming
why wrong answer is coming
Yes I am too getting wrong
Yes I am too getting wrong answer ! Is there any special case to satisfy in the outputs ?
I am getting reapeated WA ! I
I am getting reapeated WA ! I have used 3 diferrent strategies,all of them works correctly for the original project euler problem which the author seems to be inspired from.
Please some one clarify the I/O.
Why nobody is clarifying the
Why nobody is clarifying the I/O ? Copletely moronic problem is getting WA's !
@Debanjan I/O is absolutely
@Debanjan I/O is absolutely correct... count the no of inputs.. against the no of test cases... then... see the corresponding output!!! Just.. use problem statement for understanding the problem.. but write program for the I/O given!!!
The sample input and output
The sample input and output is absolutely correct,please read the questions properly and answer,also there have been various successful submissions so the error is with your own program
@ Rohan I have solved all the
@ Rohan I have solved all the 7 prob, My name was there in the rankings but after some time i see my name is nowhere in the list. Is there any prob with the rankings. Please see to it.
Thanks
@Gunjan That is not really up
@Gunjan That is not really up to me as it is controlled by codechef,please mail them about this
Its ok now sorry to bother
Its ok now sorry to bother you :)
@Rohan Garg: >The sample
@Rohan Garg:
>The sample input and output is absolutely correct,please read the questions properly and answer,also there >have been various successful submissions so the error is with your own program
Yes,I was too much obsessed with PE-52.Sometimes it's better to sleep ! Thanks.
@ Rohan Garg Actually, it is
@ Rohan Garg
Actually, it is not correct at all, if you read the problem statement carefully. It clearly says: 'contain exactly the same digits, but in a different order.'
The output shows 1 for a test case despite the fact the digits are not in a different order. Of course, everyone has ignored the problem statement and used the sample output, which is why there are correct solutions.
abe kya natak laga
abe kya natak laga rakha
suno yaar tumhe pahele batana chahiye tha ya email karna chahiye tha
this is not fair with us.
I spent my whole day for solving these problems now you are saying you haven't registred.
sending information of this much value throungh comment is not good.
please be fair in judging.
:(
:(
:(