Untitled

mail@pastecode.io avatar
unknown
python
3 years ago
380 B
1
Indexable
Never
n = int(input())
mylist = []

for x in range(n):
     a = int(input())
     mylist.append(a)
    

for x in range(n):
    b = mylist[x]

    baghi = b%7
    fi = 7 - baghi 
    mizon = fi + (b%10) 

    if baghi == 0:
        print(b)

    else:
    
        if mizon>=10:
            b = b - baghi
        else:
            b = b + fi
        print(b)