9 9 5

B2078 含 k 个 3 的数

amnl @ 2024-08-27 11:36:08


by _th_tw_on_ @ 2024-08-27 11:44:17

你代码呢


by dongzirui0817 @ 2024-08-27 11:45:40

@_th_twon 它的代码:

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

by dongzirui0817 @ 2024-08-27 11:47:00

@amnl a 会爆 int


by _th_tw_on_ @ 2024-08-27 11:49:09

e % 19 的意义是什么


by langyangyang @ 2024-09-28 15:58:24

@amnl 滚蛋吧你


|