Home
Problem Set
Training
Contest
Homework
Discussion
Record
Ranking
Login
Language
English
한국어
简体中文
正體中文
#178. 【基础】整数串拆段
ID: 178
Type: Default
1000ms
64MiB
Tried: 2
Accepted: 2
Difficulty: 10
Uploaded By:
cjzm
Tags>
字符串
【基础】整数串拆段
说明
将一个长度小于10位的数字串拆成2段,使其和为最小的素数。
例如数字串‘13304’
拆的方法有:
1 + 3304 = 3305
13 + 304 = 317
133 + 04 = 137
1330 + 4 = 1334
从上面可看出,和为素数的有:317 与137,最小的是137
输入格式
一个长度小于10的数字串
输出格式
最小的和为素数的数,若无素数则输出 -1
13304
137
来源
字符串
Login to Submit
Discussions (0)
Files
Statistics
CLOSE
SIGN IN
Using your XMJY universal account
Username
Password
Remember me
Forgot password or username?