#include //#include using namespace std; //using namespace atcoder; using ll = long long; //using mint = modint998244353; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); /* 例の場合、 A_1は4回でCに1足され、A_2は3回でCに1足される。 12の周期で一致するがA_1*4> N >> H >> T; vector A(N), period(N), C(N); for (int i=0; i> A[i]; period[i] = (H+A[i]-1)/A[i]; } //X回操作したときにCに足される回数 auto f=[&](ll X)->ll{ ll res = 0; for (int i=0; i T) return T+1; } return res; }; ll l=0, r=1e18, c; while(r-l>1){ c = (l+r)/2; if (f(c)>=T) r=c; else l=c; } for (int i=0; i> v; for (int i=0; i