| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 65586 | 邓嘉懿 | 07切比雪夫距离 | C++ | Compile Error | 0 MS | 0 KB | 284 | 2024-01-26 12:50:12 |
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d; int n=0,z=0; scanf("%d%d%d",&a,&b,&c,&d); if(a>b){ n=a-b; }else{ n=b-a } if(c>d){ z=c-d; }else{ z=d-c; } if(n>z){ printf("%d",n); }else{ printf("%d",z); } return 0; }
Main.cc: In function 'int main()':
Main.cc:6:28: warning: too many arguments for format [-Wformat-extra-args]
scanf("%d%d%d",&a,&b,&c,&d);
^
Main.cc:11:2: error: expected ';' before '}' token
}
^
Main.cc:6:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d",&a,&b,&c,&d);
^