This problem got me off guard. Not so Math heavy masters help ;-)

Revision en2, by yashpandey73, 2021-08-10 11:39:01

Given a 3D NxNxN matrix, such that value of A[i][j][k] is defined as i * k * ( i + j +k ) 1 <= i,j,k <= N for ex= A[1][1][1] = 3, A[2][2][2] = 24

Given a number S. Determine the max value of N such that: Sum of all array elements doesn't exceed S. for N = 2 , summation of Mat = 84 for N = 3 , Summation of Mat = 720 ( you can check that ) 3 <= S <= 1e16 any solution with O(N^2) or better complexity ?

Tags #basic math, #modulo summation, #strange

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English yashpandey73 2021-08-10 11:39:01 11
en1 English yashpandey73 2021-08-09 20:39:12 467 Initial revision (published)