wearfere.blogg.se

Basic number theory codechef
Basic number theory codechef









basic number theory codechef

This cookie is set by GDPR Cookie Consent plugin. The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". The cookie is used to store the user consent for the cookies in the category "Analytics". These cookies ensure basic functionalities and security features of the website, anonymously. Necessary cookies are absolutely essential for the website to function properly.

basic number theory codechef

The first and only line of each test case contains a single integer N.įor each test case, print a single line containing one integer ― the maximum possible number of visible pips.The first line of the input contains a single integer T denoting the number of test cases.Now, he is wondering: among all possible arrangements of dice, what is the maximum possible total number of visible pips? Since he is busy cooking, he is asking you to solve this. A face of a die is visible if it does not touch the table or another die. Then, Chef calculates the number of pips on the visible faces of all dice in the structure. Among all such structures, the total visible surface area of Chef’s structure must be the smallest possible. Since Chef is bored during the quarantine, he decides to stack dice for fun.įirst, Chef forms four vertical stacks of dice (not necessarily with the same height empty stacks are allowed) on his table, which together make up a pile of dice with base area up to 2×2.











Basic number theory codechef