正确做法 审核通过

lyhmbr 我要拿一等奖 2023-10-11 17:32:32 86
#include <bits/stdc++.h>
using namespace std;

int a[10000007]; int n;

int to_(string abc){ n = abc.size(); for(int i = 0 ; i < n ; i++){ // if(abc[i] >= 'A' && abc[i] <= 'Z' ){ // a[i] = abc[i] - 'A'; // } else if(abc[i] >= 'a' && abc[i] <='z'){ //// a[i] = abc[i]; // } a[i] = abc[i]; } }

int pd(int a){ return 0; if(a >= 'A' && a <= 'Z'){ return 1; }else if(a >= 'a' && a <= 'z'){ return 2; } else{ return 0; } }

void print(){ int len = n; for(int i = 0 ; i < len ; i++){ char t; // if(a[i] != ' ' || a[i] != '!'){ // t += a[i] + 'A'; // cout<<t; // }else{ // a[i] == ' ' ? cout<<" " : cout<<"!"; // } int tt = pd(a[i]); if(tt == 1){ t += a[i] +'A'; } if(tt == 2){ t += a[i] + 'a'; } if(tt == 0){ t = a[i]; } // cout<<a[i]<<" "; cout<<t; } }

int main(){ to_("Hello World"); print();

<span class="hl-keyword hl-control hl-c++">return</span> <span class="hl-constant hl-numeric hl-c++">0</span><span class="hl-punctuation hl-terminator hl-c++">;</span>

}

用NOIc++测

{{ vote && vote.total.up }}

共 14 条回复

caisen

正确做法我也有(doge)

#include <iostream>
#include <algorithm>
#include <math.h>
#include <cmath>
#include<string>
#include<cstring>
#include<list>
#include<map>
#include<queue>
#include<iterator>
#include<stack>
#include <windows.h>
using namespace std;
typedef long long LL;
typedef double DB;
typedef int IT;
typedef long double LDB;
typedef long L;
typedef short S;
#pragma GCC optimize ("O0")
void h(int hss, char hs)
{
	hss = 72;
	hs = hss;
	cout << hs;
}
void e(int ess, char es)
{
	ess = 101;
	es = ess;
	cout << es;
}
void l(int lss, char ls)
{
	lss = 108;
	ls = lss;
	cout << ls;
}
void o(int oss, char os)
{
	oss = 111;
	os = oss;
	cout << os;
}
void w(int wss, char ws)
{
	wss = 87;
	ws = wss;
	cout << ws;
}
void r(int rss, char rs)
{
	rss = 114;
	rs = rss;
	cout << rs;
}
void d(int dss, char ds)
{
	dss = 100;
	ds = dss;
	cout << ds;
}
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout << "H";
        Sleep(10);
	cout << "e";
        Sleep(10);
	cout << "l";
        Sleep(10);
	cout << "l";
        Sleep(10);
	cout << "o";
        Sleep(10);
	cout << " ";
        Sleep(10);
	cout << "W";
        Sleep(10);
	cout << "o";
        Sleep(10);
	cout << "r";
        Sleep(10);
	cout << "l";
        Sleep(10);
	cout << "d";
        Sleep(10);
	 return 0;
}
mmz1207

好一个正确做法

wyh15 Minecraft

return 0;

lyhxwc

dafen

kj123

这有亿点长了吧!!!

txz 一打七

6

tctm221

6

6

6

wchzm 蛋仔派对 蛋小黑

我愿称之为史上最短

wchzm 蛋仔派对 蛋小黑

666666666666666666666

oj89

6