我是靠谱客的博主 轻松冥王星,这篇文章主要介绍Codeforces 734A Anton and Danik,现在分享给大家,希望可以做个参考。

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <cstdio>
using namespace std;
int main() {
int n;
string s;
cin >> n >> s;
int cnt = 0;
for (int i = 0;i < n;++i) {
if (s[i] == 'A') {
cnt++;
}
}
if (cnt > (n - cnt)) {
cout << "Anton" << endl;
}
else if (cnt == (n - cnt)) {
cout << "Friendship" << endl;
}
else {
cout << "Danik" << endl;
}
//system("pause");
return 0;
}

 

最后

以上就是轻松冥王星最近收集整理的关于Codeforces 734A Anton and Danik的全部内容,更多相关Codeforces内容请搜索靠谱客的其他文章。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部