結果

問題 No.1052 電子機器X
ユーザー futago0118futago0118
提出日時 2020-05-16 20:54:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 354 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 11,960 KB
実行使用メモリ 475,856 KB
最終ジャッジ日時 2023-10-24 01:31:10
合計ジャッジ時間 3,355 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
14,424 KB
testcase_01 AC 31 ms
10,076 KB
testcase_02 AC 31 ms
10,076 KB
testcase_03 TLE -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())

N_list = [False for x in range(N)]
#print(N_list)

#N_list[0] = True
for i in range(1<<K):
    n = 0
    K_list = [-1]*K
    for j in range(K):
        if (i>>j)&1 == 1:
            K_list[j] = 1
            
    for k in K_list:
        n += k
    ans = n % N
    N_list[ans] = True
    #print(K_list)

print(sum(N_list))
0