You are viewing a single comment's thread. Return to all comments →
Simplest Algoithm :)
void update_val(int k) { int c=k; while(c%2==0){callA++;c=c/2;} c=k; while(c%3==0){callB++;c=c/3;} c=k; while(c%5==0){callC++;c=c/5;} val=k; }
Seems like cookies are disabled on this browser, please enable them to open this website
Map and Lambda Function
You are viewing a single comment's thread. Return to all comments →
Simplest Algoithm :)