Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Polycarp and Coins codeforces solution

for i in range(0, int(input())):
    n = int(input())
    c1 = n // 3;
    c2 = c1;
    if n % 3 == 1:
        c1 += 1
    elif n % 3 == 2:
        c2 += 1
    print(c1, c2)
Source by codeforces.com #
 
PREVIOUS NEXT
Tagged: #Polycarp #Coins #codeforces #solution
ADD COMMENT
Topic
Name
4+6 =