結果

問題 No.1083 余りの余り
ユーザー nehan_der_thalnehan_der_thal
提出日時 2020-06-19 21:56:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 478 ms / 3,000 ms
コード長 312 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 86,712 KB
実行使用メモリ 76,776 KB
最終ジャッジ日時 2023-09-16 14:05:52
合計ジャッジ時間 6,844 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,144 KB
testcase_01 AC 67 ms
71,068 KB
testcase_02 AC 74 ms
75,780 KB
testcase_03 AC 69 ms
71,188 KB
testcase_04 AC 78 ms
76,160 KB
testcase_05 AC 171 ms
76,524 KB
testcase_06 AC 68 ms
71,340 KB
testcase_07 AC 77 ms
76,064 KB
testcase_08 AC 73 ms
75,872 KB
testcase_09 AC 69 ms
71,280 KB
testcase_10 AC 74 ms
75,788 KB
testcase_11 AC 76 ms
76,012 KB
testcase_12 AC 67 ms
71,192 KB
testcase_13 AC 70 ms
70,996 KB
testcase_14 AC 69 ms
71,188 KB
testcase_15 AC 68 ms
70,996 KB
testcase_16 AC 68 ms
71,232 KB
testcase_17 AC 67 ms
70,976 KB
testcase_18 AC 273 ms
76,776 KB
testcase_19 AC 187 ms
76,672 KB
testcase_20 AC 78 ms
76,132 KB
testcase_21 AC 86 ms
76,176 KB
testcase_22 AC 68 ms
71,168 KB
testcase_23 AC 478 ms
76,704 KB
testcase_24 AC 472 ms
76,528 KB
testcase_25 AC 473 ms
76,620 KB
testcase_26 AC 471 ms
76,420 KB
testcase_27 AC 72 ms
75,788 KB
testcase_28 AC 471 ms
76,452 KB
testcase_29 AC 66 ms
71,240 KB
testcase_30 AC 69 ms
71,088 KB
testcase_31 AC 67 ms
70,984 KB
testcase_32 AC 67 ms
71,248 KB
testcase_33 AC 472 ms
76,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
X = sorted(list(map(int, input().split())))[::-1]
R = 0
for i in range(2**N):
    c = 0
    t = K
    cs = []
    while i:
        i, m = divmod(i, 2)
        if m:
            t = t%X[c]
            cs.append(c)
        c += 1
    R = max(R, t%X[-1])
#    print(cs, t)
print(R)
0