Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
550 B
2
Indexable
Never
// Getting input via STDIN
const readline = require("readline");

const inp = readline.createInterface({
  input: process.stdin
});

const userInput = [];

inp.on("line", (data) => {
  userInput.push(data);
});

inp.on("close", () => {
  
    let size=userInput[0];
    let arr=userInput[1].split(" ");
    sum=0;
    for(let i=0;i<arr.length;i++)
    {
        sum+=parseInt(arr[i]);
    }
    if((sum % 2 ==0) && (sum % 3 == 0) && (sum % 5 == 0))
    {
        console.log("1");
    }
    else
    {
        console.log("0");
    }
    
    
  
});