我是靠谱客的博主 闪闪大白,最近开发中收集的这篇文章主要介绍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 734A .Anton and Danik所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部