What is the mathematical logic behind the solution?

Правка en1, от Evan_Shareef, 2020-09-24 08:36:19

A pattern can be seen in the solution that the result will be equal to (n/2)*m . May be I am missing any mathematical concept behind this reason. Can anyone provide me the mathematical logic behind the solution? Why is this working?

Problem: https://vjudge.net/problem/LightOJ-1294

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Evan_Shareef 2020-09-24 08:36:19 338 Initial revision (published)