0
Python
Problem Statement Sachin is in his last year of engineering college and is still scared of maths, so he passed on his assignment to you. He believes that any integer of the form A + B' makes him angry So he gives you an integer array X of size N For each XO You have to find count of angry integers less than X[0) Input format: The first line of input contains an integer N which denotes the size of array • The second line of input contains an integer A input contains an integer B The fourth line of input contains an integer array X of . • The third line of size N.
4 odpowiedzi
+ 1
Share your attempt first. We don't do homework assignments here.
+ 1
n=int(input())
a=int(input())
b=int(input())
l=[int(x) for x in input().split()]
for i in l:
cnt=0
for x in range(i):
for y in range(i):
if a**x+b**y<i:
cnt=cnt+1
print(cnt)
0
Guys anyone help
0
I don't any idea how to slove