Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
100962 李佳璟 满足条件的数II C++ Compile Error 0 MS 0 KB 333 2024-12-14 11:46:53

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ long long m; int k,sum=0; cin>>m>>k; while(m!=0){ if(m%10==3){ sum++; } m=m/10; } else{ cout<<"NO"; } if(sum==k && m%19==0){ cout<<"YES"; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:13:9: error: 'else' without a previous 'if'
         else{
         ^