ShareMyScreen/ProjectEuler/0011

From J Wiki
Jump to navigation Jump to search

In the grid below, four numbers along a diagonal line have been marked in red.

NB.greatest item
NB.│   take the product overlappingly of every 4 items
NB.│   │    unbox the items
NB.│   │    │ row-wise box the array, its transpose, and both sets of its diagonals
NB.│   │    │ │                           bring list to proper shape
NB.│   │    │ │                           │         convert string to numbers
NB.│   │    │ │                           │         │  convert all linefeed characters to space ones
NB.│   │    │ │                           │         │  │                     paste the selected array
NB.│__ │___ │ │__________________________ │______   │_ │____________________ │______________
   >./ 4*/\ ; (<"1/.@|.,<"1/.,<"1,<"1@|:) 20 20&$ @ ". (]`(' '"_)@.(LF&=)"0) shell'xclip -o'