|
|
вернуться в форумA Question 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++ Re: A Question Послано Ade 24 янв 2023 09:55 why not try this ans+=round(pow(((int)(buf[i]-'0')),3)); |
|
|