結果
| 問題 | No.546 オンリー・ワン |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-05-18 22:19:08 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 396 bytes |
| 記録 | |
| コンパイル時間 | 1,112 ms |
| コンパイル使用メモリ | 208,876 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-10 20:31:09 |
| 合計ジャッジ時間 | 1,991 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | WA * 7 |
ソースコード
#include<bits/stdc++.h>
#define int long long
using namespace std;
int n,l,r,c[1234567],ans;
signed main(){
freopen("onlyone.in","r",stdin);
freopen("onlyone.out","w",stdout);
cin>>n>>l>>r;
for(int i=1;i<=n;i++)scanf("%lld",&c[i]);
for(int i=l;i<=r;i++){
int cnt=0;
for(int j=1;j<=n;j++){
if(i%c[j]==0)cnt++;
if(cnt>1)break;
}
if(cnt==1)ans++;
}
cout<<ans<<endl;
return 0;
}
vjudge1