#include main(){ int range[4],stock[4]; int count; int k,j; char buf[100]; //データの入力 fgets(buf,sizeof(buf),stdin); sscanf(buf,"%d %d %d %d",&range[0],&range[1],&range[2],&range[3]); for(k=0;k<4;k++){ stock[k]=range[k]; } while(range[0]<=range[1]){ while(range[2]<=range[3]){ if(range[0]!=range[2]){ count++; } range[2]++; } range[2]=stock[2]; range[0]++; } printf("%d\n",count); return(0); }