Logo
(追記) (追記ここまで)

11680번 - Dice Cup 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB30528125791.786%

문제

In many table-top games it is common to use different dice to simulate random events. A “d” or “D” is used to indicate a die with a specific number of faces, d4 indicating a foursided die, for example. If several dice of the same type are to be rolled, this is indicated by a leading number specifying the number of dice. Hence, 2d6 means the player should roll two six-sided dice and sum the result face values.

Write a program to compute the most likely outcomes for the sum of two dice rolls. Assume each die has numbered faces starting at 1 and that each face has equal roll probability.

입력

The input consists of a single line with two integer numbers, N, M, specifying the number of faces of the two dice.

출력

A line with the most likely outcome for the sum; in case of several outcomes with the same probability, they must be listed from lowest to highest value in separate lines.

제한

  • 4 ≤ N, M ≤ 20 Number of faces.

예제 입력 1

6 6

예제 출력 1

7

예제 입력 2

6 4

예제 출력 2

5
6
7

예제 입력 3

12 20

예제 출력 3

13
14
15
16
17
18
19
20
21

힌트

출처

ICPC > Regionals > Europe > Southwestern European Regional Contest > SWERC 2015 D번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /