版本比较
WZOI
正文
增加 135 行删除 4 行
639 行未改动全部展开6406416426436446456466446456466476486496506516522,264 行未改动全部展开29172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305129213052639 行未改动全部展开#define code by QhcKing#define ll long long#define TT int _T;cin>>_T;while(_T--)int main(){bool a;char b;cout<<sizeof(a)<<" "<<sizeof(c); bool a; char b; cout<<sizeof(a)<<" "<<sizeof(b);}
```### 47.空格分隔输出```cpp#include <bits/stdc++.h>2,264 行未改动全部展开return 0;}
```### 184.求特殊自然数```cpp#include <bits/stdc++.h>using namespace std;#define IOS cin.tie(nullptr)->ios::sync_with_stdio(false)#define code by QhcKing#define ll long long#define TT int _T;cin>>_T;while(_T--)signed main(){ //freopen("name.in","r",stdin); //freopen("name.out","w",stdout); IOS; cout<<248<<endl<<503<<endl<<305;}
```### 185.统计满足条件的4位数个数```cpp#include <bits/stdc++.h>using namespace std;#define IOS cin.tie(nullptr)->ios::sync_with_stdio(false)#define code by QhcKing#define LL long long#define TT int _T;cin>>_T;while(_T--)signed main(){//freopen("name.in","r",stdin);//freopen("name.out","w",stdout); IOS; LL n,a,b,c,d,x,m=0; cin>>n; for(int i=1;i<=n;i++){ cin>>x; a=x/1000; b=(x-1000*a)/100; c=(x-1000*a-100*b)/10; d=x-1000*a-100*b-10*c; if(d-a-b-c>0)m++; } cout<<m; return 0;}
```### 186.分类求和```cpp#include <bits/stdc++.h>using namespace std;#define IOS cin.tie(nullptr)->ios::sync_with_stdio(false)#define code by QhcKing#define LL long long#define TT int _T;cin>>_T;while(_T--)signed main(){//freopen("name.in","r",stdin);//freopen("name.out","w",stdout);IOS;LL x,a=0,b=0,c=0,d=0; while(cin>>x){ if(x>0){ a++; c+=x; } else if(x<0){ b++; d+=x; } } cout<<a<<" "<<b<<" "<<c<<" "<<d; return 0;}
```### 187.分离整数的各个数位```cpp#include <bits/stdc++.h>using namespace std;#define IOS cin.tie(nullptr)->ios::sync_with_stdio(false)#define code by QhcKing#define LL long long#define TT int _T;cin>>_T;while(_T--)signed main(){//freopen("name.in","r",stdin);//freopen("name.out","w",stdout); IOS; char a[10]; int i; cin.get(a,9); while(a[i]!='\0')i++; i--; for(;i>=0;i--)cout<<a[i]<<" ";}
```### 188.数字之和```cpp#include <bits/stdc++.h>using namespace std;#define IOS cin.tie(nullptr)->ios::sync_with_stdio(false)#define code by QhcKing#define LL long long#define TT int _T;cin>>_T;while(_T--)char a[12];signed main(){//freopen("name.in","r",stdin);//freopen("name.out","w",stdout); IOS; int sum; cin.get(a,11); for(int i=0;a[i]!='\0';i++) if(a[i]>'0'&&a[i]<='9')sum+=a[i]-'0'; cout<<sum;}
```### 189.数字反转```cpp#include <bits/stdc++.h>using namespace std;#define IOS cin.tie(nullptr)->ios::sync_with_stdio(false)#define code by QhcKing#define LL long long#define TT int _T;cin>>_T;while(_T--)signed main(){//freopen("name.in","r",stdin);//freopen("name.out","w",stdout); IOS; int n,s; for(cin>>n;n;n/=10)s*=10,s+=n%10; cout<<s;}
```### 更新日志#### 20260416#### 20260417