From 076d274201c2130c3d40529bfa5cd8645caa6a5c Mon Sep 17 00:00:00 2001 From: Indra Adhikary <43936212+IndraAdhikary@users.noreply.github.com> Date: Thu, 1 Oct 2020 00:17:46 +0530 Subject: [PATCH] Create GCDOPS.py --- GCDOPS.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 GCDOPS.py diff --git a/GCDOPS.py b/GCDOPS.py new file mode 100644 index 0000000..786246b --- /dev/null +++ b/GCDOPS.py @@ -0,0 +1,11 @@ +for _ in range(int(input())): + n = int(input()) + l = list(map(int,input().split())) + for i in range(n): + if l[i]>0 and (i+1)%l[i]==0 and l[i]<=(i+1): + continue + else: + print('NO') + break + else: + print('YES')