src2020/1653_numcutup/Readme.md

25 lines
471 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 整数拆段
[问题描述]
教学案例,必须使用函数完成求解!
  将一个长度小于15位的数字串拆成2段使其和为最小的素数。
  例如数字串13304拆的方法有:
   1 + 3304 = 3305
   13 + 304 = 317
   133 + 04 = 137
   1330 + 4 = 1334
  从上面可看出和为素数的有317 与137最小的是137
[输入格式]
  一个长度小于15的数字串。
[输出格式]
  最小的和为素数的数,若无素数则输出 -1。
[输入样例]
13304
[输出样例]
137