五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(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ó)家法律
库尔勒市| 景泰县| 中江县| 永康市| 寻乌县| 若羌县| 松江区| 云和县| 南丰县| 昌黎县| 中超| 古丈县| 屏边| 高州市| 钟祥市| 思南县| 图木舒克市| 手游| 稷山县| 桃江县| 恩平市| 彭水| 衡南县| 山东省| 扬中市| 临城县| 日土县| 同心县| 青州市| 理塘县| 阳信县| 松滋市| 延庆县| 安泽县| 平利县| 房产| 涟源市| 武邑县| 通渭县| 康平县| 中卫市|