#include<cstdio> #include<algorithm> #include<string> #include<iostream> using namespace std; int a[100] = {},tp,sum = 0; string s; int main() { scanf("%d",&tp); while(tp !=&...