look at my answer:AC
int main() { double x; double y; if((y-x)%2==0) cout<<(y-x)/2; else cout<<(y-x)/2+1; return 0; }