範例輸入 :
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; }
全站熱搜