/* -*- coding: utf-8 -*- * * 1362.cc: No.1362 [Zelkova 8th Tune] Black Sheep - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int MAX_N = 500000; /* typedef */ /* global variables */ char s[MAX_N + 4]; int cs[128], ps[128]; /* subroutines */ /* main */ int main() { scanf("%s", s); for (int i = 0; s[i]; i++) cs[s[i]]++, ps[s[i]] = i; for (int c = 0; c < 128; c++) if (cs[c] == 1) { printf("%d %c\n", ps[c] + 1, c); break; } return 0; }