/ OPS / 题库 /

Correct Solution

Correct Solution

#描述#
Everyone knows Daimin big cow is very strong,so he often give tough problems to others to solve. One day Daimin big cow came across Ganggang,he asked Ganggang to solve a problem.He told the number n to Ganggang and said:
<BR>
----Shuffle the digits in this number in order to obtain the smallest possible number without leading zeros.
<BR>
----No problem! ---said Ganggang and immediately gave him an answer.
<BR>
Daimin big cow said a random nmber,so he doesn’t know whether Ganggang’s answer is correct.Help him to find this out,because impatient Ganggang is waiting for the verdict.

#格式#
##输入格式##
The first line contains one integer n (0≤n≤109) without leading zeroes. The second lines contain one integer m (0≤m≤109) — Ganggang's answer, possibly with leading zeroes.

##输出格式##
Print “Ganggang is perfect” if Ganggang's answer is correct and
“poor Ganggang” otherwise.

#样例1#
##样例输入1##

2134
1234
2134
3124

##样例输出1##

Ganggang is perfect
poor Ganggang

#限制#
1000ms
32768KB

#提示#

#来源#
t_c

信息

ID
1688
难度
5
分类
category1 点击显示
标签
递交数
0
已通过
0
通过率
?
上传者