首页 > 代码库 > URAL 1409 Two Gangsters

URAL 1409 Two Gangsters

A + B + 1

 1 import java.util.Scanner; 2  3 public class P1409 4 { 5     public static void main(String args[]) 6     { 7         try (Scanner cin = new Scanner(System.in)) 8         { 9             while (cin.hasNext())10             {11                 int a = cin.nextInt();12                 int b = cin.nextInt();13                 int total = a + b - 1;14                 int x = total - a;15                 int y = total - b;16                 System.out.println(x + " " + y);17             }18         }19     }20 }

 

URAL 1409 Two Gangsters