eolymp
bolt
Try our new interface for solving problems
Problems

Product of digits

published at 10/27/17, 12:26:07 pm

задача просто супер

published at 4/29/22, 7:21:03 am

JS / При таком решении из 16 тестов прошел только 1:

function functionTest(n) { let x11 = n / 100; let x1 = Math.trunc(x11); let x222 = n / 10; let x22 = x222 % 10; let x2 = Math.trunc(x22); let x3 = n % 10; return x1 + x2 + x3; }

process.stdin.on('data', function (data) { console.log(functionTest(data)) });