21504_CubeRoo

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

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

Pro.ID

21504

Title

Cube Root

Title链接

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

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 1000/500 MS (Java/Others)     Memory Limit: 65536/32768 K (Java/Others)
  • 描述

    Your task is to calculate the cube root of a given positive integer. We can not remember why exactly we need this, but it has something in common with a princess, a young peasant, kissing and half of a kingdom (a huge one, we can assure you).
    Write a program to solve this crucial task.

    输入

    The input consists of large positive integers of up to 150 decimal digits.Each number is on its own separate line of the input file. The input file may contain empty lines. Numbers can be preceded or followed by whitespaces but no line exceeds 255 characters.

    输出

    Description

    Your task is to calculate the cube root of a given positive integer. We can not remember why exactly we need this, but it has something in common with a princess, a young peasant, kissing and half of a kingdom (a huge one, we can assure you).
    Write a program to solve this crucial task.

    Input

    The input consists of large positive integers of up to 150 decimal digits.Each number is on its own separate line of the input file. The input file may contain empty lines. Numbers can be preceded or followed by whitespaces but no line exceeds 255 characters.

    Output

    For each number in the input file your program should output a line consisting of two values separated by single space. The second value is the cube root of the given number, truncated (not rounded!) after the 10th decimal place. First value is a checksum of all printed digits of the cube root, calculated as the sum of the printed digits modulo 10.

    Sample Input
    1
      8

    1000

    2
    33076161
    Sample Output
    1 1.0000000000
    2 2.0000000000
    1 10.0000000000
    0 1.2599210498
    6 321.0000000000
    Source

    样例输入

    1
      8

    1000

    2
    33076161

    样例输出

    1 1.0000000000
    2 2.0000000000
    1 10.0000000000
    0 1.2599210498
    6 321.0000000000

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部