Skip to content

Commit 5f744dc

Browse files
committed
Added code for a problem
Added code for a problem in Ad-hoc category
1 parent 9e23b21 commit 5f744dc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Ad-Hoc/(CODECHEF)cachehit.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
for _ in range(int(input())):
2+
x,b,m = map(int, input().split())
3+
4+
a = list(map(int, input().split()))
5+
6+
c = 1
7+
8+
for i in range(m-1):
9+
if (a[i]//b != a[i+1]//b):
10+
c += 1
11+
print(c)

0 commit comments

Comments
 (0)