Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
81577 | 季洁 | class | C++ | Accepted | 92 | 1 MS | 248 KB | 197 | 2023-08-09 16:22:44 |
#include<bits/stdc++.h> using namespace std; int k,x,y,p,q,ans; int main(){ cin>>k>>x>>y>>p>>q; for(int i=1;i<=k;i++){ if(i%(x+y)>=x&&i%(p+q)>=p) ans++; } cout<<ans; return 0; }