結果
問題 |
No.546 オンリー・ワン
|
ユーザー |
![]() |
提出日時 | 2017-07-14 23:17:33 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 316 bytes |
コンパイル時間 | 510 ms |
コンパイル使用メモリ | 54,488 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-10-07 23:32:01 |
合計ジャッジ時間 | 3,921 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 TLE * 1 -- * 1 |
other | -- * 7 |
ソースコード
#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; }