結果

問題 No.546 オンリー・ワン
ユーザー shiboy_AAAshiboy_AAA
提出日時 2017-07-14 23:17:33
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 316 bytes
コンパイル時間 435 ms
コンパイル使用メモリ 54,232 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-04-16 20:31:59
合計ジャッジ時間 3,850 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>

using namespace std;

int main(void){
  int n,l,h,c[12];
  cin >> n >> l >> h;
  for(int i=1;i<=n;i++) cin >> c[i];

  int cnt=0,ans=0;
  for(int i=l;i<=h;i++){
    for(int j=1;j<=n;j++){
      if(i%c[j]==0) cnt++;
    }
    if(cnt==1) ans++;
    cnt=0;
  }
  cout << ans << endl;
  return 0;
}
0