// yukicoder: No. 656 ゴルフ // 2019.5.2 bal4u #include #define gc() getchar() void ins(char *s) // 文字列の入力 スペース以下の文字で入力終了 { char *p = s; do *s = gc(); while (*s++ > ' '); *--s = 0; } char S[20], *s; int main() { int ans; ins(s = S); ans = 0; while (*s) { if (*s == '0') ans += 10; else ans += *s & 0xf; s++; } printf("%d\n", ans); return 0; }