Untitled

public
yousefkarem91 Sep 18, 2024 Never 51
Clone
C++ paste1.cpp 12 lines (12 loc) | 251 Bytes
1
#include <bits/stdc++.h>
2
using namespace std;
3
int main() {
4
for(int i=1;i<=5;i++) {
5
for(int j=1;j<=5;j++) {
6
int x;cin>>x;
7
if(x==1) {
8
cout<<abs(3-i)+abs(3-j);
9
}
10
}
11
}
12
}