Startup and Tech
Sunday, 6 September 2020
Codeforces 1405A Solution -- Permutation Forgery Solution In Python
Program
t = int(input()) for i in range(t): n = int(input()) a = [int(j) for j in input().split()[:n]] s = str(a) b = a[len(a)::-1].copy() for k in range(len(b)): if(k==len(b)-1): print(b[k]) else: print(b[k], end=" ")
Output
Input : 3 2 1 2 6 2 1 6 5 4 3 5 2 4 3 1 5 Output : 2 1 3 4 5 6 1 2 5 1 3 4 2
Codeforces 110A Solution - Nearly Lucky Number Solution In Java
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment