22707_HappinessHote

2022-5-16 18:22| 发布者: Hocassian| 查看: 21| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-5-89506878149999-Problem List-采集的数据-后羿采集器.html

Pro.ID

22707

Title

Happiness Hotel

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=22707

AC

5

Submit

7

Ratio

71.43%

时间&空间限制

  • Time Limit: 3000/1000 MS (Java/Others)     Memory Limit: 262144/131072 K (Java/Others)
  • 描述

    The life of Little A is good, and, he managed to get enough money to run a hotel. The best for him is that he need not go to work outside, just wait for the money to go into his pocket. Little A wants everything to be perfect, he has a wonderful plan that he will keep one most beautiful reception whose size is 1() (which means the reception is 1 square meter). There are other k rooms that have the same area, and the area is x^2(), x is an integer; Little A wants his hotel to be a square. Little A is a good thinker, but not a good maker. As his poor performance on math, he cannot calculate the least area needed to build such a hotel of his will. Now, this task belongs to you, solve this problem to make Little A’s dream of Happy Hotel come true. Please be careful, the whole area should only contain k rooms, and the reception, there should not be any vacant place.

    输入

    There are several test cases.
    Each case contains only one integer k ( 1<= k <= 1000 ) , the number of rooms the hotel should have in one line.
    Proceed to the end of file.

    输出

    Description
    The life of Little A is good, and, he managed to get enough money to run a hotel. The best for him is that he need not go to work outside, just wait for the money to go into his pocket. Little A wants everything to be perfect, he has a wonderful plan that he will keep one most beautiful reception whose size is 1() (which means the reception is 1 square meter). There are other k rooms that have the same area, and the area is x^2(), x is an integer; Little A wants his hotel to be a square. Little A is a good thinker, but not a good maker. As his poor performance on math, he cannot calculate the least area needed to build such a hotel of his will. Now, this task belongs to you, solve this problem to make Little A’s dream of Happy Hotel come true. Please be careful, the whole area should only contain k rooms, and the reception, there should not be any vacant place.
    Input
    There are several test cases.
    Each case contains only one integer k ( 1<= k <= 1000 ) , the number of rooms the hotel should have in one line.
    Proceed to the end of file.
    Output
    Output one integer d, means the hotel’s area is d^2 ( If there is no answer, output "no solution" ) .The output of one test case occupied exactly one line.
    Sample Input
    1
    2
    3
    Sample Output
    no solution
    3
    2
    Source

    样例输入

    1
    2
    3

    样例输出

    no solution
    3
    2

    提示

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部