Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
5698 詹梓涵 13求7个数的最大值 C++ Accepted 0 MS 264 KB 345 2024-12-14 09:35:38

Tests(10/10):


Code:

#include<iostream> // cin\cout\endl #include<algorithm> #include<limits.h> using namespace std; int main(){ int m=INT_MIN;//最小//INT_MAX最大 int temp; for(int i=1;i<=7;i++){ cin>>temp; if(temp>m) swap(temp,m);//交换temp和m的值 } cout<<m*m<<endl; cout<<m*m*m<<endl; return 0; }