結果

問題 No.2016 Countdown Divisors
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2022-07-22 21:36:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 589 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 87,308 KB
実行使用メモリ 77,728 KB
最終ジャッジ日時 2023-09-17 09:09:33
合計ジャッジ時間 3,825 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,168 KB
testcase_01 AC 117 ms
77,280 KB
testcase_02 AC 117 ms
77,496 KB
testcase_03 AC 118 ms
77,636 KB
testcase_04 AC 112 ms
77,440 KB
testcase_05 AC 111 ms
77,292 KB
testcase_06 AC 97 ms
77,384 KB
testcase_07 AC 99 ms
77,632 KB
testcase_08 AC 119 ms
77,508 KB
testcase_09 AC 119 ms
77,312 KB
testcase_10 AC 117 ms
77,564 KB
testcase_11 AC 115 ms
77,700 KB
testcase_12 AC 117 ms
77,300 KB
testcase_13 AC 116 ms
77,520 KB
testcase_14 AC 116 ms
77,532 KB
testcase_15 AC 115 ms
77,728 KB
testcase_16 AC 119 ms
77,692 KB
testcase_17 AC 117 ms
77,568 KB
testcase_18 AC 116 ms
77,616 KB
testcase_19 AC 74 ms
71,364 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

1 or 2 かな

7 -> 5 -> 3 -> 1
9 -> 6 -> 2
4 -> 1

1 -> 1
2 -> 2
3 -> 1
4 -> 1
5 -> 2
6 -> 1
7 -> 2
8 -> 

"""
"""
for i in range(1,100):

    x = i
    while True:

        now = 0
        for j in range(1,x+1):
            if x % j == 0:
                now += 1

        x -= now
        if x == 0:
            print (i,now)
            break
"""

import sys
from sys import stdin

TT = int(stdin.readline())

for loop in range(TT):

    N = int(stdin.readline())

    ans = [None,1,2,1,1,1,2,1,1,2]

    if N < len(ans):
        print (ans[N])
    else:
        print (2)

    
0