国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(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ó)家法律
西乌珠穆沁旗| 兴安县| 泉州市| 彰武县| 东方市| 稷山县| 台前县| 华坪县| 普洱| 靖江市| 莱州市| 江西省| 宁都县| 常山县| 外汇| 垣曲县| 逊克县| 讷河市| 阳城县| 北票市| 莱阳市| 成都市| 苍溪县| 城口县| 兴义市| 南郑县| 祁连县| 平乐县| 巴楚县| 灵台县| 紫阳县| 镇康县| 富民县| 南雄市| 安阳市| 阜南县| 长宁区| 开远市| 博爱县| 南通市| 习水县|