[Timus] 1409 Two Gangsters

Problem statement is here: http://acm.timus.ru/problem.aspx?space=1&num=1409

One of the easiest problem. Code as the problem states.

public class Task1409 {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int harry = in.nextInt();
        int larry = in.nextInt();
        int sum = harry + larry - 1;
        out.println((sum - harry) + " " + (sum - larry));
    }
}

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.