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

Правка en2, от 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 ?

Теги #basic math, #modulo summation, #strange

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский yashpandey73 2021-08-10 11:39:01 11
en1 Английский yashpandey73 2021-08-09 20:39:12 467 Initial revision (published)