#include int itix,itiy,mokuhyoux,mokuhyouy,ans,zans; int main(void) { //printf("今の座標と目標の座標教えて:"); scanf("%d %d %d %d",&itix,&itiy,&mokuhyoux,&mokuhyouy); if(itix == mokuhyoux || itiy == mokuhyouy){ ans=1; printf("%d",ans); return 0; } if(itix<0){ itix=itix*-1; } if(itiy<0){ itiy=itiy*-1; } if(mokuhyoux<0){ mokuhyoux=mokuhyoux*-1; } if(mokuhyouy<0){ mokuhyouy=mokuhyouy*-1; } zans = mokuhyoux - itix + mokuhyouy - itiy; if(-4 < zans&&zans<4){ ans = 1; printf("%d",ans); } else{ ans = 2; printf("%d",ans); } return 0; }