the link of the problem : http://codeforces.com/contest/734/problem/A and what is the problem of my code
My Code :
import java.util.Scanner;
import java.lang.String;
public class Main
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int n=in.nextInt();
String s=in.nextLine();
int d=0;
int a=0;
for(int i=0;i<n;i++)
{
if(s.charAt(i)=='A')
a++;
else
d++;
}
if(a>d)
System.out.println("Anton");
else if(a<d)
System.out.println("Danik");
else
System.out.println("Friendship");
}
}