結果
問題 | No.546 オンリー・ワン |
ユーザー |
![]() |
提出日時 | 2017-07-18 15:38:08 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 623 bytes |
コンパイル時間 | 585 ms |
コンパイル使用メモリ | 64,624 KB |
実行使用メモリ | 13,636 KB |
最終ジャッジ日時 | 2024-10-08 10:52:01 |
合計ジャッジ時間 | 3,995 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 TLE * 1 -- * 1 |
other | -- * 7 |
ソースコード
#include <iostream>#include <stdio.h>#include <cstring>#include <math.h>#include <algorithm>#include <vector>#define rep(i,n) for(int i=0;i<n;i++)#define FOR(i,a,b) for(int i=a;i<b;i++)#define ll long long#define LL long long#define mass 1000000007using namespace std;int main(){int n,l,h;cin>>n>>l>>h;int *c;c=new int[n];rep(i,n){cin>>c[i];}int count=0;FOR(i,l,h+1){int ch=0;rep(j,n){if(i%c[j]==0){if(ch==0){ch++;}else if(ch==1){ch++;break;}}}if(ch==1){count++;}}cout<<count<<endl;delete []c;return 0;}