問題一覧 > 通常問題

No.374 コイン

レベル : / 実行時間制限 : 1ケース 1.000秒 / メモリ制限 : 64 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 314
作問者 : hirakich1048576 / テスター : 紙ぺーぱー
お気に入りにしたユーザー ProblemId : 1021 / 自分の提出
問題文最終更新日: 2026-06-26 06:07:17
Coins
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Show the original
yukicoder contest 138 (順位表) の他の問題:

Problem

S and K are going to play the following game.

  • They take turns placing a circular coin of radius B on a circular table of radius A.
  • When placing a coin, it must not stick out of the table or overlap another coin. (Coins are allowed to touch each other.)
  • The player who first becomes unable to place a coin loses.
Coins that have been placed must not be moved.
S places a coin first, and both players act so as to win if at all possible. Determine who wins.

Input

A B

The radius of the table $A$ ($1 \le A \lt 2^{32}$) and the radius of the coin B ($1 \le B \lt 2^{32}$) are given on one line, separated by a space.

Output

Print "S" on one line if S wins, or "K" if K wins.

Sample

Sample 1
Input
4 6
Output
K

If the radius of the table is smaller than the radius of the coin,
S cannot place a coin from the start, so K wins.

Sample 2
Input
2048 788
Output
S

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。