码迷,mamicode.com
首页 > 其他好文 > 详细

URAL 1409 Two Gangsters

时间:2014-08-26 09:48:46      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   java   ar   div   log   sp   new   

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

标签:style   blog   color   java   ar   div   log   sp   new   

原文地址:http://www.cnblogs.com/gwhahaha/p/3936498.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!