| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 75673 | 黄枳润 | 11向上取整 | C++ | Compile Error | 0 MS | 0 KB | 203 | 2024-05-28 18:52:53 |
#include<iostream> using namespace std; int main() { double a; cin>>a; a=a*10; if(a%10==0){ a=a/10; }else{ a=a-a%10+1; } cout<<a; return 0; }
Main.cc: In function 'int main()':
Main.cc:8:10: error: invalid operands of types 'double' and 'int' to binary 'operator%'
if(a%10==0){
^
Main.cc:11:15: error: invalid operands of types 'double' and 'int' to binary 'operator%'
a=a-a%10+1;
^