範例輸入 : 
POKEMON
TYPHOON

範例輸出 :

146821
598701

#include<stdio.h>
#include<stdlib.h>

int main()
{
	char s[7],i;
	while(scanf("%s",s)!=EOF)
	{	
		for(i=0;i<6;i++)
		{
			printf("%d",abs((int)s[i]-(int)s[i+1]));		
		}
		printf("\n");
	}
	return 0;
}
 
arrow
arrow
    全站熱搜

    東勢厝滴yang 發表在 痞客邦 留言(0) 人氣()