Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
4731 高振轩 06变换四位数 C++ Accepted 0 MS 256 KB 253 2024-09-13 21:10:52

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a=0,b=0,n,c=0,d=0; cin>>n; a=n/1000; b=n%1000/100; c=n%1000%100/10; d=n%1000%100%10; if(b==0){ cout<<a<<d<<c<<endl; } else{ cout<<b<<a<<d<<c<<endl; } return 0; }