Type: Default 1000ms 256MiB

特殊四位数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

把整数3025从中剪开分为30和25两个数,此时再将这两数之和平方,(30+25)^2=3025 计算结果又等于原数。 现在的任务是让你求出从小到大按顺序第k个符合这个条件的四位数。 最小的四位数是1000,最大的四位数是9999。

Input Format

一个整数 k 0<k<10

Output Format

从小到大按顺序第k个符合条件的数。

Sample

input

1

output

2025

Hint

时间限制:1s1 \text {s}

空间限制:256MB256 \text {MB}

20200910-基础递归训练

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
10
Start at
2020-9-13 15:29
End at
2020-10-1 15:29
Duration
432 hour(s)
Host
Partic.
18