Minimal Weighted Digit Sum | CodeChef