固定节目《某蒻智想把以前的题搞AC结果依旧A不了》

B2078 含 k 个 3 的数

zhenshijuruo @ 2024-09-15 14:13:11

上代码:

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,k;
    cin>>n>>k;
    if(k*3>=n)cout<<"YES";
    else cout<<"NO";
    return 0;
}

呃不知道是哪里错了,还是60分


by zhenshijuruo @ 2024-09-15 14:52:34

@scratch_szc 谢谢啦!!!


by TimADE @ 2024-09-15 14:53:37

@zhenshijuruo

@scratch_szc

求关


by zhenshijuruo @ 2024-09-15 14:55:00

@TimADE 已关,谢谢!!!


by zhenshijuruo @ 2024-09-15 15:01:30

此帖结


by yjc19143397 @ 2024-10-05 18:09:22

@TimADE 警示:请用万能头!!!!!!

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

by TimADE @ 2024-10-05 20:39:58

@yjc19143397 为什么?


上一页 |