using System;
public class Program
{
public static void Main()
int num = 12345, r;
//int [] arr = new {}
while(num !=0) {
r = num % 10;
Console.WriteLine(r);
num = num /10;
}
string str = "getdatawithdatetoui";
char[] arr = str.ToCharArray();
int cnt = 0;
int index = 0;
for(int i=0; i < str.Length - 1; i ++ )
index = arr[i];
for(int j = i+1; j< str.Length - i- 1; j++)
if(arr[i] == arr[j]) cnt = cnt+1;
if(cnt > 1) {
Console.WriteLine(arr[i]);
Console.WriteLine(cnt);