|
|
вернуться в форумI get WA 1 with calculating distance in this way for(int i=0;i<len;i++) { ans+=pow(((int)(buf[i]-'0')),3); } while accepted in this way for(int i=0;i<len;i++) { ans+=(buf[i]-'0')*(buf[i]-'0')*(buf[i]-'0'); } WHY?!!!! Is this a bug on judge or bug in function?!! the compiler is g++ why not try this ans+=round(pow(((int)(buf[i]-'0')),3)); |
|
|