我是靠谱客的博主 闪闪大白,这篇文章主要介绍codeforces 734A .Anton and Danik,现在分享给大家,希望可以做个参考。

#include<iostream>
using namespace std;
char a[100010];
int main(){
int N;
int m=0,n=0;
cin>>N;
for(int i=0;i<N;i++)
{
cin>>a[i];
if(a[i]=='A')
m++;
else if(a[i]=='D')
n++;
}
if(m>n)
cout<<"Anton"<<endl;
else if(m<n)
cout<<"Danik"<<endl;
else if(m==n)
cout<<"Friendship"<<endl;
return 0;
}


最后

以上就是闪闪大白最近收集整理的关于codeforces 734A .Anton and Danik的全部内容,更多相关codeforces内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(62)

评论列表共有 0 条评论

立即
投稿
返回
顶部