Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
312869 | 朱宸宇 | 【C1-T】至少要买几瓶止咳糖浆? | C++ | 通过 | 100 | 1 MS | 252 KB | 271 | 2025-03-15 19:40:08 |
#include <iostream> #include <cstdio> using namespace std; int main() { int age,cnt=0; cin>>age; if (age>10) cnt=25; else if (age<=10 and age>=7) cnt=15; else cnt=5; cnt*=15; if (cnt%120==0) cout<<cnt/120; else cout<<(int)(cnt/120+1); return 0; }