Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
73520 李琥博 单价最高的书 C++ Runtime Error 0 MS 272 KB 385 2024-05-19 12:00:10

Tests(0/2):


Code:

#include<bits/stdc++.h> using namespace std; struct shi{ int b; string m; int l; int z; }; int main(){ int n,d=-2e9; cin>>n; shi a[n],s; for(int i=0;i<n;i++){ cin>>a[i].b>>a[i].l>>a[i].l>>a[i].z; } for(int i=0;i<n;i++){ int k=a[i].z/a[i].l; if(k>d){ s=a[i]; d=k; } } cout<<s.b<<" "<<s.m<<" "<<s.l<<" "<<s.z<<" "<<d; return 0; }


Run Info:

Runtime Error:Floating point exception