#include #include int inscal(int x,int y,int l); int main() { int x,y,l; int instruction=0; int absx,absy; absx=abs(x); absy=abs(y); instruction=inscal(absx,absy,l); if(y>=0){ instruction++; } else{ instruction+=2; } printf("%d",instruction); return 0; } int inscal(int x,int y,int l) { int instruction=0; if(x%l==0){ instruction+=x/l; } else{ instruction+=x/l+1; } if(y%l==0){ instruction+=y/l; } else{ instruction+=y/l+1; } return instruction; }