Skip to content

Instantly share code, notes, and snippets.

@kuuso
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuuso/3138fc807d57b0f0552a to your computer and use it in GitHub Desktop.
Save kuuso/3138fc807d57b0f0552a to your computer and use it in GitHub Desktop.
BEGIN{for(;f<58;)printf("%c",65+f++)}
#number of char 37
#kinds of char 26
#Point 962
END{while(f<58)printf("%c",65+f++)}
#number of char 35
#kinds of char 26
#Point 910
END{for(;f<58;)printf("%c",65+f++)}
#number of char 35
#kinds of char 24
#Point 840
using System;
using System.Collections;
using System.Collections.Generic;
class saiten{
static void Main(){
String s="";
Dictionary<char,int> D=new Dictionary<char,int>();
int cnt=0;
Console.WriteLine("---Code---");
while((s=Console.ReadLine())!=null){
Console.WriteLine(s);
cnt+=s.Length;
for(int i=0;i<s.Length;i++){
if(!D.ContainsKey(s[i]))D.Add(s[i],0);
D[s[i]]++;
}
}
Console.WriteLine("--Result--");
Console.WriteLine("number of char\t{0}",cnt);
Console.WriteLine("kinds of char\t{0}",D.Count);
foreach(char c in D.Keys)Console.Write(c);
Console.WriteLine("");
Console.WriteLine("Point\t{0}",cnt*D.Count);
Console.WriteLine("---------");
Console.WriteLine("");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment