fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main() {
  5. int n,x,y;
  6. for(n=1;n<=25;n++)
  7. {cin>>x;
  8. if(x==1)
  9. {y=abs(n-13)/5+abs(n-13)%5;}
  10. }
  11. cout<<y<<endl;
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 5300KB
stdin
Standard input is empty
stdout
414987488