Submit | All submissions | Best solutions | Back to list |
EMP - University Employees |
On some island each inhabitant is either a knight who only tells the truth, or a liar who always lies. Also, on the island there exists a university of technology where some of the inhabitants work. All of the university employees will always tell you the following two things, no matter which employee you ask:
It is also known that no two employees of the university have an identical salary, and no two work equally. Write a program which will compute how many persons are employed by this university.
Input
The only input line contains two integers N and M, with one space between them [N, M <= 1000000000].
Output
The output must contain only one integer - the total number of employees of this university, or 0 if there is no way to find the number of employees.
Example
Input: 1 1 Output: 2
Author: Filimonenkov D.O.
Added by: | Roman Sol |
Date: | 2006-04-24 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ERL JS-RHINO NODEJS PERL6 VB.NET |
Resource: | ZCon 2007 |
hide comments
|
|||||||
2012-06-23 13:08:00 Tejas Shah
The sale for points question! :P |
|||||||
2012-06-16 20:57:07 Darky
Not for spoj! |
|||||||
2012-06-16 15:08:13 :)
what is this!!! free points in classical!!!!! |
|||||||
2012-06-11 10:00:19 The Mundane Programmer
delete it buddy.... |
|||||||
2012-06-11 09:59:55 The Mundane Programmer
delete it buddy.... |
|||||||
2012-06-09 13:53:03 Kyle Dencker
Could anyone give a few more test cases? I am not quite getting what they are asking. |
|||||||
2012-06-09 12:39:35 Pranshul Agarwal
even not for the begineers |
|||||||
2012-05-25 20:32:14 Ashhar Jawaid
what the hell is this question doesnt even qualify for a tutorial 6 lines only!!!! and 110 chars Last edit: 2012-05-25 20:32:54 |
|||||||
2012-05-20 21:03:09 Vrian7
this is problem is tutorial.. |
|||||||
2012-05-11 15:00:18 Mathan Kumar
Enna Koduma sir ithu?? Not even qualify for tutorials.. |