# _*_ coding:utf-8 _*_
import sys
n,p,q = map(int, sys.stdin.readline().split())
len1 = -1
len2 = -1
s = raw_input()
for i in range (0, 101):
for j in range(0, 101):
if p * i + q * j == n :
len1 = i
len2 = j
if len1 == -1:
print -1
exit()
print len1 + len2
for i in range(0,len1):
print s[i*p : i*p+p]
for i in range(0, len2):
print s[len1*p + i*q : len1*p + i*q+q]
Educational Codeforces Round 4 A题 (python进行字符串的划分)
最新推荐文章于 2021-04-13 14:14:00 发布