daily pastebin goal
62%
SHARE
TWEET

Untitled

a guest Sep 26th, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var matrix = [[,]];
  2. // var i = 5;
  3. // var j = 5;
  4.  
  5. for (var i = 0; i <= 5; i++) {
  6.     for (var j = 0; j <= 5; j++) {
  7.         matrix[i][j] = readline().split(' ');  
  8.  
  9.         if (matrix[i][j] != 0) {
  10.             print (Math.abs(2 - i) + Math.abs(2 - j));
  11.         }
  12.     }
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top