{"size": 505, "ext": "js", "max_stars_repo_path": "HTMLhead/WhyWeAvoidAlcohol.js", "max_stars_repo_name": "childrenOfCrong/AlS", "max_stars_repo_stars_event_min_datetime": "2018-09-28T09:07:47.000Z", "max_stars_repo_stars_event_max_datetime": "2019-07-25T15:13:30.000Z", "max_issues_repo_path": "HTMLhead/WhyWeAvoidAlcohol.js", "max_issues_repo_name": "childrenOfCrong/AlS", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "HTMLhead/WhyWeAvoidAlcohol.js", "max_forks_repo_name": "childrenOfCrong/AlS", "max_forks_repo_forks_event_min_datetime": "2018-09-20T04:57:38.000Z", "max_forks_repo_forks_event_max_datetime": "2018-09-28T05:18:27.000Z"}
{"max_stars_count": 4, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 24.0476190476, "max_line_length": 52, "alphanum_fraction": 0.5069306931}
var solution = function(day, drinkingDayArr) {
    var dayArr = new Array(day).fill(0)
    dayArr[0] = 1
    dayArr.forEach((v,i) => {
        let oneDay = drinkingDayArr.shift()
        if((i) === oneDay) {
            dayArr[i-1] = 0
            dayArr[i] = 0
            return;
        } else if (i > 0) {
            dayArr[i] = dayArr[i-1] + 1
        }
        drinkingDayArr.unshift(oneDay)
    })
    return dayArr.reduce((a,b) => a + b)
}

console.log(solution(1111111, [11,222,444,555,666]))


