public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in).useLocale(Locale.US); double a = s.nextDouble(); double b = s.nextDouble(); double c = s.nextDouble(); double d = s.nextDouble(); double sum = 0.0; if (a > 5) sum += a; if (b > 5) sum += b; if (c > 5) sum += c; if (d > 5) sum += d; System.out.println(sum); } }
a = x div 100 = 125 div 100 = 1
b = x mod 100 = 125 mod 100 = 25
c = x mod 10 = 125 mod 10 = 5
s = a+b+c = 1+25+5 = 31