Run ID:160746

提交时间:2026-09-26 11:52:19

#include<iostream> using namespace std; int main(){ int a,b,c,d,e,f,g,h; cin>>b>>c>>d>>e>>f>>g>>h; if(b>c&&b>d&&b>e&&b>f&&b>g&&b>h){ a=b; } else if(c>b&&c>d&&c>e&&c>f&&c>g&&c>h){ a=c; } else if(d>b&&d>c&&d>e&&d>f&&d>g&&d>h){ a=d; } else if(e>b&&e>c&&e>d&&e>f&&e>g&&e>h){ a=e; } else if(f>b&&f>d&&f>e&&f>c&&f>g&&f>h){ a=f; } else if(g>b&&g>d&&g>e&&g>f&&g>c&&g>h){ a=g; } else if(h>b&&h>d&&h>e&&h>f&&h>g&&h>c){ a=h; } cout<<a*a<<endl; cout<<a*a*a<<endl; return 0; }