ABC336(A-C)

A

cpp 复制代码
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    cout<<'L';
    for(int i=0;i<n;i++){
        cout<<"o";
    }
    cout<<"ng"<<endl;
    return 0;
    
}

B

cpp 复制代码
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    int num=0;
    while(n%2==0){
        num++;
        n/=2;
    }
    cout<<num<<endl;
    return 0;

}

C

cpp 复制代码
#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
    ll n;
    cin>>n;
    ll n0=n-1;
    string s="";
    if(n==1)cout<<"0"<<endl;
    else {
    while(n0>0){
        if(n0%5==0){
            s="0"+s;
        }
        else if(n0%5==1){
            s="2"+s;
        }
        else if(n0%5==2){
            s="4"+s;
        }
        else if(n0%5==3){
            s="6"+s;
        }
        else if(n0%5==4){
            s="8"+s;
        }
        n0/=5;
    }
cout<<s<<endl;
    }
}
相关推荐
h39742 小时前
DirectShow过滤器开发-视频源过滤器
c++·windows·音视频·directshow
程序猿编码4 小时前
榨干 RTX5090 算力!Qwen3 专用单卡推理引擎,手写C++/CUDA 算子实现 MTP 推测解码
开发语言·c++·大模型推理·qwen3·多模态推理
西飘客4 小时前
vs 怎么根据dll 生成lib文件
c++·qt
程序员老陆5 小时前
深入理解 C++ thread_local:线程私有存储的正确打开方式
开发语言·c++·程序设计
沐晓时光5 小时前
C语言入门,深入理解指针(3)
c语言·开发语言
信奥卷王6 小时前
[GESP202609 六级] 分树规划
算法
夏幻灵6 小时前
LeetCode 21:合并两个有序链表——双指针与哑节点详解
算法·leetcode·链表
SuperByteMaster7 小时前
wfi进入之前没有清除basepri, 导致中断优先级不够,wfi 退不出来
c语言
徐小黑ACG7 小时前
Golang 基础05 结构体struct
开发语言·算法·golang