Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
47130 | 徐若宸 | 练32.2 种植竹笋 | C++ | No Test Data | 0 MS | 0 KB | 229 | 2024-05-12 16:23:50 |
#include <bits/stdc++.h> using namespace std; int k,h=16; bool flag=1; int main(){ cin>>k; for(int i=2;i<=365;i++){ h=h+h/i; if(h>=k){ cout<<i; flag=false; break; } } if(flag){ cout<<-1; } }