Codeforces Round #379 (Div.2)
はい。
http://codeforces.com/contest/734
A. Anton and Danik
ざっくりと大意
・Aが多ければAntonの勝ち、Dが多ければDanikの勝ち、同数ならFriendship
Python2
n=input() s=raw_input() print 'Friendship' if s.count('A')==s.count('D') else 'Anton' if s.count('A')>s.count('D') else 'Danik'
A,Dの数をcountで比較すれば大丈夫だと思う。
B. Anton and Digits
ざっくりと大意
・k2,k3,k5,k6を使って32と256を作って合計が最大になるようにする。
Python2
k2,k3,k5,k6=map(int,raw_input().split()) print min(k2,k5,k6)*256+min(k3,k2-min(k2,k5,k6))*32
256を優先して作って、余った2と3で32を作った和が解になる。