-8
inline int inp() {
char c = gc();
while(c<'0' || c>'9') c = gc();
int ret = 0;
while(c>='0' && c<='9') {
ret = (ret << 3) + (ret << 1) + c - 48;
c = gc();
}
return ret;
}
什麼是ret
試圖通過左移運算符,然後減去48?你能解釋下面代碼中ret變量的工作嗎?
幻數48是「0」的ASCII碼。 – Jarod42
研究這段代碼,並在編寫自己的代碼時做相反的事。 – user4581301