欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

Codeforces Round #194 (Div. 2) A. Candy Bags

程序员文章站 2022-05-24 18:59:08
...

Gerald has n younger brothers and their number happens to be even. One day he bought n 2 candy bags. One bag has one candy, one bag has two candies, one bag has three candies and so on. In fact, for each integer k from 1 to n 2 he has exac

Gerald has n younger brothers and their number happens to be even. One day he bought n2 candy bags. One bag has one candy, one bag has two candies, one bag has three candies and so on. In fact, for each integer k from 1 to n2 he has exactly one bag with kcandies.

Help him give n bags of candies to each brother so that all brothers got the same number of candies.