您的位置:首页 > 其它

Coderforces Beautiful Matrix

2017-06-14 21:07 323 查看
http://codeforces.com/problemset/problem/263/A

import java.util.Scanner;

public class Beautiful_Matrix {

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
for(int i = 0; i < 5; i++) {
for(int j = 0; j < 5; j++) {
int k = scanner.nextInt();
if(k == 1) {
System.out.println(Math.abs(i-2) + Math.abs(j-2));
}
}
}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: