We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
x = x * 10000 + y1; // It was 1000 Changed 10000
if(x % 4 == 0 || x % 7 == 0) { //It was AND changed to OR
result = result + 1;
}
if(m1 > 12) {
y1 = y1 + 1;
m1 = 1; //It was m1+1, So changed to 1
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Prime Dates
You are viewing a single comment's thread. Return to all comments →
Five Corrections are their
if(year % 400 == 0) { month[2] = 29; //It was 28 } else if(year % 100 == 0) { month[2] = 28; //It was 29 }