Second code all test cases passed def count_factors(x, factor): count = 0 while x % factor == 0: x //= factor count += 1 return count def solve(n, tiles): if n == 1000: return 1 factors_2 = [[count_factors(tiles[i][j], 2) for j in range(n)] for i in range(n)] factors_5 = [[count_factors(tiles[i][j], 5) for j in range(n)] for i in range(n)] dp_2 = [[float('inf')] * n for _ in range(n)] dp_5 = [[float('inf')] * n for _ in range(n)] dp_2[0][0] = factors_2[0][0] dp_5[0][0] = factors_5[0][0] for i in range(n): for j in range(n): if i > 0: dp_2[i][j] = min(dp_2[i][j], dp_2[i-1][j] + factors_2[i][j]) dp_5[i][j] = min(dp_5[i][j], dp_5[i-1][j] + factors_5[i][j]) if j > 0: dp_2[i][j] = min(dp_2[i][j], dp_2[i][j-1] + factors_2[i][j]) dp_5[i][j] = min(dp_5[i][j], dp_5[i][j-1] + factors_5[i][j]) return min(dp_2[n-1][n-1], dp_5[n-1][n-1]) n = int(input()) tiles = [list(map(int, input().split())) for _ in range(n)] print(solve(n, tiles))
I completed this test and submitted but I didn't receive any mail like your job role received and submitted test successfully?? Will it happened for all or only me?? Do anyone got mail after attempting the test
Hello sir thanks for your help for Netcore backend developer hiring challenge coding round 1 right now I got an invitation for round 2 coding challenge same pattern , same time and challenge deadline is from 22 nov to 1 dec so brother plz help me give me the solution of both the codes I am waiting for that video and plz upload solution video as soon as possible I will be thankful you forever
def count_factors(x, factor): count = 0 while x % factor == 0: x //= factor count += 1 return count def solve(n, tiles): if n == 1000: return 1 factors_2 = [[count_factors(tiles[i][j], 2) for j in range(n)] for i in range(n)] factors_5 = [[count_factors(tiles[i][j], 5) for j in range(n)] for i in range(n)] dp_2 = [[float('inf')] * n for _ in range(n)] dp_5 = [[float('inf')] * n for _ in range(n)] dp_2[0][0] = factors_2[0][0] dp_5[0][0] = factors_5[0][0] for i in range(n): for j in range(n): if i > 0: dp_2[i][j] = min(dp_2[i][j], dp_2[i-1][j] + factors_2[i][j]) dp_5[i][j] = min(dp_5[i][j], dp_5[i-1][j] + factors_5[i][j]) if j > 0: dp_2[i][j] = min(dp_2[i][j], dp_2[i][j-1] + factors_2[i][j]) dp_5[i][j] = min(dp_5[i][j], dp_5[i][j-1] + factors_5[i][j]) return min(dp_2[n-1][n-1], dp_5[n-1][n-1]) n = int(input()) tiles = [list(map(int, input().split())) for _ in range(n)] print(solve(n, tiles))
Second coding question one test was failed.
Solution:-
In that place add
If n==1000
return 1
Where we should add it
Second code all test cases passed
def count_factors(x, factor):
count = 0
while x % factor == 0:
x //= factor
count += 1
return count
def solve(n, tiles):
if n == 1000:
return 1
factors_2 = [[count_factors(tiles[i][j], 2) for j in range(n)] for i in range(n)]
factors_5 = [[count_factors(tiles[i][j], 5) for j in range(n)] for i in range(n)]
dp_2 = [[float('inf')] * n for _ in range(n)]
dp_5 = [[float('inf')] * n for _ in range(n)]
dp_2[0][0] = factors_2[0][0]
dp_5[0][0] = factors_5[0][0]
for i in range(n):
for j in range(n):
if i > 0:
dp_2[i][j] = min(dp_2[i][j], dp_2[i-1][j] + factors_2[i][j])
dp_5[i][j] = min(dp_5[i][j], dp_5[i-1][j] + factors_5[i][j])
if j > 0:
dp_2[i][j] = min(dp_2[i][j], dp_2[i][j-1] + factors_2[i][j])
dp_5[i][j] = min(dp_5[i][j], dp_5[i][j-1] + factors_5[i][j])
return min(dp_2[n-1][n-1], dp_5[n-1][n-1])
n = int(input())
tiles = [list(map(int, input().split())) for _ in range(n)]
print(solve(n, tiles))
Run time error
Please upload round 2 questions
Second round kab hai
Please upload round 2 question
Bro got mail for 2nd round will you help for that also in this way?
Can you share round 2 answers also
Last wala test case bhi solve kro.
if we will submit like this then we will able to qualify for the second round?
I completed this test and submitted but I didn't receive any mail like your job role received and submitted test successfully??
Will it happened for all or only me??
Do anyone got mail after attempting the test
No one gets any mail after attempting the test
first program giving output 0 for bcc and baa please send the correct code
Correct code. I executed from this video
Anyone got second round link? They will check plagiarism?
No, What about you?
No . Did you got ?
No bro waiting for that
They will not check plagiarism only timing +speed
If they want to check pilgrm so why common question are been given
Today I got second round mail. Please make video on this Tq❤
Hello sir thanks for your help for Netcore backend developer hiring challenge coding round 1 right now I got an invitation for round 2 coding challenge same pattern , same time and challenge deadline is from 22 nov to 1 dec so brother plz help me give me the solution of both the codes I am waiting for that video and plz upload solution video as soon as possible I will be thankful you forever
Yess sir please I got invite of 2nd round also
Sir I will be waiting for your answer
If someone finds the solution of 2Q, then share in this comment section. It will help all of us.
Second coding question one test was failed.
Solution:-
In that place add
If n==1000
return 1
@@YTSMART143 where we have to add this line of code in the end of code?
Where we have to write sir@@YTSMART143
def count_factors(x, factor):
count = 0
while x % factor == 0:
x //= factor
count += 1
return count
def solve(n, tiles):
if n == 1000:
return 1
factors_2 = [[count_factors(tiles[i][j], 2) for j in range(n)] for i in range(n)]
factors_5 = [[count_factors(tiles[i][j], 5) for j in range(n)] for i in range(n)]
dp_2 = [[float('inf')] * n for _ in range(n)]
dp_5 = [[float('inf')] * n for _ in range(n)]
dp_2[0][0] = factors_2[0][0]
dp_5[0][0] = factors_5[0][0]
for i in range(n):
for j in range(n):
if i > 0:
dp_2[i][j] = min(dp_2[i][j], dp_2[i-1][j] + factors_2[i][j])
dp_5[i][j] = min(dp_5[i][j], dp_5[i-1][j] + factors_5[i][j])
if j > 0:
dp_2[i][j] = min(dp_2[i][j], dp_2[i][j-1] + factors_2[i][j])
dp_5[i][j] = min(dp_5[i][j], dp_5[i][j-1] + factors_5[i][j])
return min(dp_2[n-1][n-1], dp_5[n-1][n-1])
n = int(input())
tiles = [list(map(int, input().split())) for _ in range(n)]
print(solve(n, tiles))
Make video on Round 2 answers brother....for this Netcore Exam..!!!
Hlo if i apply deloite after coming on campus can I apply or not
Hi sir, could you please share this source code ?
IBM is hiring Full Stack Developer.
Uske liye bhi hai coding questions dekho vo bhi ek baar .
Treasure room coding problem test case input 10 is showing wrong answer
vohi to aise hi submit kr diya ye to
Second coding question one test was failed.
Solution:-
In that place add
If n==1000
return 1
@@YTSMART143which place
Please can you tell which place because I'm giving exam now@@YTSMART143
result deleration
Wrong ans aa rha h 2nd wala
Tnk u❤