代码
#include <iostream>
#include <iomanip>
using namespace std;
long long res = 0;
int main()
{
int a, b;
cin >> a >> b;
if (a % 19 != 0)
{
cout << "NO";
return 0;
}
while (a)
{
int x = a % 10;
if (x == 3)
res++;
a /= 10;
}
if (res == b)
cout << "YES";
else
cout << "NO";
}
自动整齐代码:
vscode格式化代码
安装 VsCode 格式化代码插件
搜索并安装 Beautify 格式化代码插件
使用:打开要格式化的文件 —> F1 —> Beautify file —> 选择你要格式化的代码类型
格式化对齐快捷键:
Windows: Ctrl + K + F
Windows:Shift + Alt + F
Mac: Shift + Option + F
Ubuntu: Ctrl + Shift + I