結果

問題 No.546 オンリー・ワン
ユーザー YNonoharaYNonohara
提出日時 2017-07-19 16:44:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 382 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 17,824 KB
最終ジャッジ日時 2024-04-17 04:05:28
合計ジャッジ時間 3,888 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
16,256 KB
testcase_01 AC 30 ms
10,880 KB
testcase_02 AC 30 ms
10,880 KB
testcase_03 AC 31 ms
10,752 KB
testcase_04 AC 29 ms
10,752 KB
testcase_05 AC 30 ms
10,752 KB
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N, L, H = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]
ans_cnt=0
if N==1 and C[0]==1:
    print(H-L+1)
else:
    for j in range(L,H+1):
        sub_cnt=0
        for k in range(N):
            if j%C[k]==0:
                sub_cnt+=1
                if sub_cnt==2:
                    break
        if sub_cnt==1:
            ans_cnt+=1
    print(ans_cnt)
0