18 lines
623 B
YAML
18 lines
623 B
YAML
|
title: What is the greatest product of four adjacent numbers on the same straight line in the 20 by 20 grid?
|
||
|
url: http://projecteuler.net/problem=11
|
||
|
|
||
|
desc: |
|
||
|
In the 2020 grid below, four numbers along a diagonal line have been marked in red.
|
||
|
What is the greatest product of four adjacent numbers in any direction (up, down, left, right, or diagonally) in the 2020 grid?
|
||
|
(See file input)
|
||
|
|
||
|
solution: |
|
||
|
Bruteforce (Unless someone found a smarter way)
|
||
|
|
||
|
solutions:
|
||
|
solve.php:
|
||
|
desc: Expects the matrix as stdin
|
||
|
language: php
|
||
|
solve.rb:
|
||
|
desc: Expects the matrix as stdin
|
||
|
language: ruby
|