PersonalCorpus 版 (精华区)
1245644 Big Guava ... 10260 Accepted
0:00.000 64 2002/11/18 06:00:16.419
void main()
{
#ifndef ONLINE_JUDGE
freopen("k:\\uva\\i10260","r",stdin);
freopen("k:\\uva\\o10260","w",stdout);
#endif
int i,j,k;
char s[30],t[30];
int p[26]={0,1,2,3,0,1,2,0,0,2,2,4,5,5,0,1,2,6,2,3,0,1,0,2,0,2};
while (gets(s)!=NULL) {
memset(t,0,sizeof(t));
k=0; j=0;
for (i=0;s[i];i++) if (k!=p[s[i]-'A']) {
k=p[s[i]-'A'];
if (k) t[j++]=k+'0';
}
printf("%s\n",t);
}
}
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.630毫秒