programmingAtCoder Grand Contest 014 Task A - Cookie Exchanges 考察メモAGC014のA問題を、より短いコードで、O(1)で解く方法を考える。