• [B] Pass Through The Square

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • There is a x * y rectangle consists of x * y numbers of 1 * 1 squares. So, its one diagonal will pass through how many squares?
    When the diagonal only passes through one of square's vertex, we say it does not pass through that square.

  • 输入
  • Input only contain two positive integers x and y (1 <= x, y <= 10, 000).
  • 输出
  • Output the answer.
  • 样例输入
  • 1 1
    
  • 样例输出
  • 1
    
  • 提示
  • 来源
  • Hungar
  • 操作

显示春菜