列表

详情


NC230835. Rise of Shadow

描述

Rumor has it that shadows rise in a prime leap year. A prime leap year is a leap year, and the year number is also a prime number.

Toilet-Ares has recently learned the definitions of leap year and prime number. Given a specific year number, he wants to know if it is a prime leap year.

Recall that
Every year that is exactly divisible by four is a leap year, except for years that are exactly divisible by 100, but these centurial years are leap years if they are exactly divisible by 400;
A prime number (or a prime) is a positive integer greater than one that is not a product of two smaller positive integers.

输入描述

The first line contains only one integer T (), denoting the number of test cases.

Each case consists of only an integer a () in one line, representing the number of the year Toilet-Ares wants to know about.

输出描述

For each case, if the year is a prime leap year, print "yes" in one line, otherwise print "no" in one line.

示例1

输入:

1
2020

输出:

no

原站题解

上次编辑到这里,代码来自缓存 点击恢复默认模板

matlab 解法, 执行用时: 101ms, 内存消耗: 8312K, 提交时间: 2021-11-21 09:45:05

n=input("");
for i=1:n
    disp("no");
end

Python3 解法, 执行用时: 63ms, 内存消耗: 7036K, 提交时间: 2021-11-20 16:03:37

print('no\n'*(int(input())))

上一题