最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

CF 1475A - Odd Divisor

2023-07-25 16:04 作者:您是打尖兒還是住店呢  | 我要投稿

You are given an integer n. Check if n has an odd divisor, greater than one (does there exist such a number x (x>1) that n is divisible by x

?and x is odd).

For example, if n=6, then there is x=3. If n=4, then such a number does not exist.

Input

The first line contains one integer t (1≤t≤104) — the number of test cases. Then t test cases follow.

Each test case contains one integer n (2≤n≤1014).


Please note, that the input for some test cases won't fit into 32-bit integer type, so you should use at least 64-bit integer type in your programming language.

Output

For each test case, output on a separate line:"YES" if n has an odd divisor, greater than one;"NO" otherwise.

You can output "YES" and "NO" in any case (for example, the strings yEs, yes, Yes and YES will be recognized as positive).

---------------------------------------

給定一個(gè)整數(shù) n。 檢查 n 是否有一個(gè)大于 1 的奇數(shù)約數(shù)(是否存在這樣的數(shù)字 x (x>1) 使得 n 可以被 x 整除

? x 是奇數(shù))。

例如,如果n=6,則x=3。 如果n=4,那么這樣的數(shù)不存在。

輸入

第一行包含一個(gè)整數(shù) t (1≤t≤104) — 測(cè)試用例的數(shù)量。 然后是測(cè)試用例。

每個(gè)測(cè)試用例包含一個(gè)整數(shù)n(2≤n≤1014)。


請(qǐng)注意,某些測(cè)試用例的輸入不適合 32 位整數(shù)類型,因此您應(yīng)該在編程語(yǔ)言中至少使用 64 位整數(shù)類型。

輸出

對(duì)于每個(gè)測(cè)試用例,在單獨(dú)的行上輸出:如果 n 具有大于 1 的奇數(shù)除數(shù),則輸出“YES”;否則輸出“NO”。

您可以在任何情況下輸出“YES”和“NO”(例如,字符串 yEs、yes、Yes 和 YES 將被識(shí)別為正數(shù))。

----------------------------------------------

如果這個(gè)數(shù)是奇數(shù),那么它肯定是yes的,如果這個(gè)數(shù)是偶數(shù),那么就要一直除以2,去看最后的商是否大于1,如果大于1,那么是yes的,如果等于1,那就是NO的;

下面待代碼:


CF 1475A - Odd Divisor的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
色达县| 湘西| 大兴区| 泸定县| 安乡县| 阳高县| 西和县| 唐海县| 麻城市| 文成县| 曲沃县| 北宁市| 手游| 康平县| 丹棱县| 城固县| 淮滨县| 宾阳县| 武山县| 平度市| 宜昌市| 大同市| 莲花县| 曲靖市| 清镇市| 绩溪县| 黑龙江省| 宣恩县| 广昌县| 百色市| 西乡县| 翁牛特旗| 赣榆县| 临朐县| 辽宁省| 启东市| 集安市| 阜阳市| 锦屏县| 新乐市| 拉萨市|