Buying Apples!

Problem Name:
Buying Apples!
Site:Spoj
Links:
Tags:
Problem setters: