eolymp
bolt
Try our new interface for solving problems
Məsələlər

Cube Root

Cube Root

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. \InputFile The input consists of large positive integers of up to \textbf{150} decimal digits. Each number is on its own separate line of the input file. No line exceeds \textbf{255} characters except some whitespaces. \OutputFile For each number in the input 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 \textbf{10}^th decimal place. First value is a checksum of all printed digits of the cube root, calculated as the sum of the printed digits modulo \textbf{10}.
Zaman məhdudiyyəti 2 saniyə
Yaddaşı istafadə məhdudiyyəti 64 MiB
Giriş verilənləri #1
1
8
1000
2
33076161
Çıxış verilənləri #1
1 1.0000000000
2 2.0000000000
1 10.0000000000
0 1.2599210498
6 321.0000000000
Mənbə SEERC 2004