Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
159820 陈鸣锐 07苹果和虫子 C++ Compile Error 0 MS 0 KB 179 2026-09-06 17:10:46

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { double n,x,y,a; cin>>n>>x>>y; a=(n-x/y) if(y%x!=0){ cout<a-1; } if(y%x==0){ cout<<a; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:2: error: expected ';' before 'if'
  if(y%x!=0){
  ^
Main.cc:10:7: error: invalid operands of types 'double' and 'double' to binary 'operator%'
  if(y%x==0){
       ^