1011:水题。
#include<bits/stdc++.h> #define REP(i,a,b) for(int i=a;i<=b;i++) #define MS0(a) memset(a,0,sizeof(a)) using namespace std; typedef long long ll; const int maxn=1000100; const int INF=1e9+10; const ll MOD=1e9+7; const double EPS=1e-13; char s[maxn]; int n; int cnt[1200]; int main() { //freopen("in.txt","r",stdin); int T;cin>>T;int casen=1; while(T--){ printf("Case #%d: ",casen++); MS0(cnt); scanf("%s",s+1); n=strlen(s+1); REP(i,1,n) cnt[s[i]]=1; int res=0; REP(i,0,1100) res+=cnt[i]; printf("%d\n",res); } return 0; }