|
|
вернуться в форумSimpliest algorythm //pseudo code divider = first_input-1; dividend = second_input-1; result: divider + dividend - FindCrossesOnTheWay(dividend,divider) *FindCrossesOnTheWay if(divider < dividend) swap() for(i=1;i<=divider;i++) if((dividend * i) % divider == 0) crosses++ |
|
|