ÇëÔÚÕûÊý n ÖÐɾ³ým¸öÊý×Ö, ʹµÃÓàϵÄÊý×Ö°´Ô´ÎÐò×é³ÉµÄÐÂÊý×î´ó£¬
±ÈÈçµ±n=92081346718538£¬m=10ʱ£¬ÔòеÄ×î´óÊýÊÇ9888
2 92081346718538 10 1008908 5
9888 98
/*Ìâ½â£º Ì°ÐIJßÂÔ£¬Ã¿´ÎÇó³ö¾Ö²¿×îÓŴﵽȫ¾Ö×îÓÅ¡£ */
<†·Ÿ"http://www.Bkjia.com/kf/ware/vc/" target="_blank" class="keylink">vcD48cD612tK7tM6jutPJ09rX7tbVvfbK5LP2NLj2yv2jrLnKtdrSu7TO0qrV0jWhojOhojjWrsewtcTK/dbQ1+6087XEyv2jrLzHwrzPwrHqsqLK5LP2oaMKPC9wPjxwPrXatv60zqO61Nq12tK7tM7V0rP2tcTX7rTzyv3WrrrzILrNIDOhojjWrsewtcTK/dbQ1+6087XEyv2jrLzHwrzPwrHqsqLK5LP2oaM8L3A+PHA+tdrI/bTOo7rU2rXatv60ztXSs/a1xNfutPPK/dauuvMgus0gONaux7C1xMr91tDX7rTztcTK/aOsvMfCvM/Cseqyosrks/ahowo8L3A+PHA+0sC0y8DgzcajqMjnyc/NvKOpLi4uLi4u1rHWwaOoZW5kPj1sZW4pPC9wPteq19Sjumh0dHA6Ly9ibG9nLmNzZG4ubmV0L3UwMTM4MDY4MTQvYXJ0aWNsZS9kZXRhaWxzLzM5NDI5Njc1PC9wcmU+CjxkZD4KPHByZSBjbGFzcz0="brush:java;">AC´úÂë
# include# include int main(void) { int t,i,flag,len,st,m,end; char max; char c[110]; scanf("%d", &t); while (t--) { scanf("%s %d",&c, &m); len = strlen(c); st = i = 0; end = m; while (end < len) { for (i = flag = st,max = c[st]; i <= end; i++) if (max < c[i]) { flag = i; max = c[i]; } st = flag + 1; end++; printf("%c",max); } printf("\n"); } return 0; }
×îÓÅ´úÂ룺#include
02.
#include
03.
int
main()
04.
{
05.
int
k,l,max,z;
06.
char
s[105],ans[105];
07.
scanf
(
"%d"
,&z);
08.
while
(z--)
09.
{
10.
scanf
(
"%s%d"
,s,&k);
11.
l =
strlen
(s);
12.
for
(
int
i=0,q=-1;i
13.
{
14.
max = 0;
15.
for
(
int
j=q+1;j<=k+i;j++)
16.
if
(max < s[j])
17.
max = s[j] , q = j;
18.
ans[i] = max;
19.
}
20.
ans[l-k] =
'\0'
;
21.
puts
(ans);
22.
}
23.
return
0;
24.
}
#include
02.
#include
03.
int
main()
04.
{
05.
int
k,l,max,z;
06.
char
s[105],ans[105];
07.
scanf
(
"%d"
,&z);
08.
while
(z--)
09.
{
10.
scanf
(
"%s%d"
,s,&k);
11.
l
=
strlen
(s);
12.
for
(
int
i=0,q=-1;i
13.
{
14.
max
= 0;
15.
for
(
int
j=q+1;j<=k+i;j++)
16.
if
(max
< s[j])
17.
max
= s[j] , q = j;
18.
ans[i]
= max;
19.
}
20.
ans[l-k]
=
'\0'
;
21.
puts
(ans);
22.
}
23.
return
0;
24.
}