Task DescriptionDiscussion (0)
Task :: z-koren
Mr. Little Z is looking at a piece of paper and unsuccessfully trying to find the square root of a number written on the paper.
Help Mr. Little Z find the number B which is the square root of BIG number A. The number A has 1000 digits at most and the square root of A will always be an integer.
INPUT:
The first line of the standard input contains the number 0<N<=1000, where N is the number of digits in the given number A. The next N lines contain the digits of the number.
The first line of the standard input contains the number 0<N<=1000, where N is the number of digits in the given number A. The next N lines contain the digits of the number.
OUTPUT:
To the standard output write number M, where M represents the length of number B (where B is the square-root of the number A) and in the next M lines write the digits of the number B (from the most significant digit to the least significant).
To the standard output write number M, where M represents the length of number B (where B is the square-root of the number A) and in the next M lines write the digits of the number B (from the most significant digit to the least significant).
Input:
Output:
Explanation:
The number written on the paper was 625, and its square-root is 25.
3
6
2
5
6
2
5
Output:
2
2
5
2
5
Explanation:
The number written on the paper was 625, and its square-root is 25.
Submit Solution
Available Languages
Task info
| Name: | z-koren |
| Time: | 10 sec. |
| Memory: | 16 MB |
| #Tests: | 20 |
| Author: | Z |
| AddedBy: | admin |
Task Ratings
| Difficulty: | 3.9 (90 votes) |
| Quality: | 4.1 (69 votes) |
Acceptance Rate
Recent Submissions
Fastest Solutions
| User | Time |
|---|---|
| 1010011010 | 0 s. |
| Adamka | 0 s. |
| OuyangJialin | 0.02 s. |
| _qwAker_ | 0.045 s. |
| tikva | 0.06 s. |
| toppykung | 0.06 s. |
| dimke | 0.075 s. |
| crusader | 0.09 s. |
| Hachiikung | 0.09 s. |
| picsel | 0.105 s. |
Solved By
Home
Training
Competitions
Forum
FAQ