Project Euler #13: Large sum

  • + 0 comments
    function processData(input) {
        const [n, ...number] = input.split('\n').map(BigInt)
        
        let result = BigInt(0);
        for(let i = 0; i<n; i++) {
            result +=BigInt(number[i])
        }
        
        console.log(result.toString().substring(0, 10))
    {
        
    }