Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 100 点
問題文
高橋くんは A グラムの純金と B グラムの純銀 (0 \leq A,B,\ 0 \lt A+B) をよく溶かした上で混ぜ合わせ、新たな金属を生成しました。
生成された金属は「純金」「純銀」「合金」のいずれでしょうか?
なお、生成された金属は
- 0 \lt A かつ B=0 なら「純金」
- A=0 かつ 0 \lt B なら「純銀」
- 0 \lt A かつ 0 \lt B なら「合金」
であるとみなします。
制約
- 0 \leq A,B \leq 100
- 0 \lt A+B
- A,B は整数
入力
入力は以下の形式で標準入力から与えられる。
A B
出力
生成された金属が「純金」なら Gold
と、「純銀」なら Silver
と、「合金」なら Alloy
と出力せよ。
入力例 1
50 50
出力例 1
Alloy
0 \lt A かつ 0 \lt B であるため、生成された金属は「合金」です。
入力例 2
100 0
出力例 2
Gold
0 \lt A かつ B=0 であるため、生成された金属は「純金」です。
入力例 3
0 100
出力例 3
Silver
A=0 かつ 0 \lt B であるため、生成された金属は「純銀」です。
入力例 4
100 2
出力例 4
Alloy
Score : 100 points
Problem Statement
Takahashi melted and mixed A grams of gold and B grams of silver (0 \leq A,B,\ 0 \lt A+B) to produce new metal.
What metal did he produce: pure gold, pure silver, or an alloy?
Formally, the product is called as follows.
- Pure gold, if 0 \lt A and B=0.
- Pure silver, if A=0 and 0 \lt B.
- An alloy, if 0 \lt A and 0 \lt B.
Constraints
- 0 \leq A,B \leq 100
- 1 \leq A+B
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
A B
Output
If the product is pure gold, print Gold
; if it is pure silver, print Silver
; if it is an alloy, print Alloy
.
Sample Input 1
50 50
Sample Output 1
Alloy
We have 0 \lt A and 0 \lt B, so the product is an alloy.
Sample Input 2
100 0
Sample Output 2
Gold
We have 0 \lt A and B=0, so the product is pure gold.
Sample Input 3
0 100
Sample Output 3
Silver
We have A=0 and 0 \lt B, so the product is pure silver.
Sample Input 4
100 2
Sample Output 4
Alloy