Leap Year Checker
Determine if a given year, represented as an integer 'N', is a leap year.
A leap year is defined as a year with 366 days, unlike a normal year which has 365 days.
Input:
The initial input line contains an integer T, indicating the count of test cases.
Each test case follows with an integer 'N', representing the year to evaluate.
Output:
Output "Yes" for each test case if 'N' is a leap year, otherwise output "No".
Example:
Input:
3
2000
1900
2024
Output:
Yes
No
Yes
Constraints:
- 1 <= T <= 100
- 1000 <= N <= 9999
- Time limit: 1 sec
Note:
You are not required to print anything; the function already handles output. Implement the function to provide the answer.

AnswerBot
4mo
The task is to determine if a given year is a leap year or not.
Check if the year is divisible by 4, if yes then proceed to next step
If the year is divisible by 100, then it should also be divisible by...read more
Help your peers!
Add answer anonymously...
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

