题解 | 彩虹糖的梦
彩虹糖的梦
https://www.nowcoder.com/practice/1d8e370f4e6a43f89203ae616ededfdb?channelPut=w25springcamp
#include <bits/stdc++.h>
using namespace std;
using ll =long long;
int main() {
int mi=INT_MAX;
for(int i=0;i<7;i++)
{
int t;
cin>>t;
mi=min(mi,t);
}
cout<<mi;
return 0;
}
// 64 位输出请用 printf("%lld")
通过题目不难发现,我们只需要输出最小值即为最后答案,类似于木桶理论。
#牛客春招刷题训练营#