/* package whatever; // don't place package name! */
import java.util.* ;
import java.lang.* ;
import java.io.* ;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
char Char;
int count;
String s
= "Par programming is fun!" ; s = s.toLowerCase ( ) ;
for ( Char = 0 ; Char <= s.length ( ) - 1 ; Char++ ) {
count = 0 ;
if ( carateresSaidos.indexOf ( s.charAt ( Char) ) ==- 1 ) {
for ( int i = 0 ; i < s.length ( ) ; i++ ) {
if ( s.charAt ( i) == s.charAt ( Char) ) {
count++;
}
}
if ( count > 1 ) {
System .
out .
println ( "Number of occurences of " + s.
charAt ( Char
) + " is " + count
) ; }
carateresSaidos+= s.charAt ( Char) ;
}
}
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCWNoYXIgQ2hhcjsKCQlpbnQgY291bnQ7CgkJU3RyaW5nIHMgPSAiUGFyIHByb2dyYW1taW5nIGlzIGZ1biEiOwoJCXMgPSBzLnRvTG93ZXJDYXNlKCk7CgkJU3RyaW5nIGNhcmF0ZXJlc1NhaWRvcyA9ICIiOwoKCQlmb3IgKENoYXIgPSAwOyBDaGFyIDw9IHMubGVuZ3RoKCktMTsgQ2hhcisrKSB7CgkJICAgIGNvdW50ID0gMDsKCQkgICAgCgkJICAgIGlmIChjYXJhdGVyZXNTYWlkb3MuaW5kZXhPZihzLmNoYXJBdChDaGFyKSk9PS0xKXsKCQkJICA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