Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
159815 令狐文丽 07苹果和虫子 C++ Compile Error 0 MS 0 KB 188 2026-09-06 17:00:44

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:2: error: expected initializer before 'cin'
  cin>>n>>x>>y;
  ^
Main.cc:6:11: error: 'y' was not declared in this scope
  int s= n-y/x;
           ^