We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65056d6 commit 878a344Copy full SHA for 878a344
734A - Anton and Danik.cpp
@@ -0,0 +1,34 @@
1
+#include<bits/stdc++.h>
2
+using namespace std;
3
+
4
+// Code Written By: Vikash Patel
5
6
+int main()
7
+{
8
+ int n;
9
+ cin>>n;
10
+ string s;
11
+ cin>>s;
12
+ int a=0,d=0;
13
+ for(int i=0;i<n;i++)
14
+ {
15
+ if(s[i]=='A')
16
+ a++;
17
+ else
18
+ d++;
19
+ }
20
+ if(a>d)
21
+ cout<<"Anton"<<endl;
22
+ else if(a<d)
23
+ cout<<"Danik"<<endl;
24
25
+ cout<<"Friendship"<<endl;
26
+}
27
28
29
30
31
32
33
34
0 commit comments