From fd205ff210a54ea9e52f28541e8bdee0825d19ba Mon Sep 17 00:00:00 2001 From: ShazidMahsrafi Date: Sat, 22 Jul 2023 01:02:33 +0600 Subject: [PATCH] initial commit --- 148A Insomnia cure/148A.cpp | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 148A Insomnia cure/148A.cpp diff --git a/148A Insomnia cure/148A.cpp b/148A Insomnia cure/148A.cpp new file mode 100644 index 0000000..d12b005 --- /dev/null +++ b/148A Insomnia cure/148A.cpp @@ -0,0 +1,39 @@ +#include +using namespace std; +using ll = long long; + + +void solve() +{ + int k,l,m,n,d; + cin>>k>>l>>m>>n>>d; + setdamaged; + for(int i=k; i<=d; i+=k) + { + damaged.insert(i); + } + for(int i=l; i<=d; i+=l) + { + damaged.insert(i); + } + for(int i=m; i<=d; i+=m) + { + damaged.insert(i); + } + for(int i=n; i<=d; i+=n) + { + damaged.insert(i); + } + cout<> TC; + //cin.ignore(); + while (TC--) solve(); +} \ No newline at end of file