全体司辰向我看齐!!!
查看原帖
全体司辰向我看齐!!!
1255488
__notTrueLight__楼主2024/3/2 21:35
#include<bits/stdc++.h>/*John·Titor翻译器*/ 
using namespace std;
int main(){
    string code;
    cin>>code;
    int n=code.length();
    long long num=0;
    char word;
    while(4869){
    	n=code.length();
    	num=0;
		for(int i = 0; i < n; i++){
			if(code[i]>='0' && code[i]<='9'){
				num += (code[i]-'0');
			}else if(code[i]>='a' && code[i]<='f'){
				num += (code[i]-'a'+10);
			}else if(code[i]>='A' && code[i]<='F'){
				num += (code[i]-'A'+10);
			}
			if(i<n-1)
			{
				num *= 16;
			}
		}
		word=num;
		cout<<word;
		cin>>code;
	}
    
	return/*191981*/0;
}

And next!!!

#include<bits/stdc++.h>/*John·Titor编码器*/ 
using namespace std;
int main(){
	char word; 
	long ascl;
	int last=0;
	string code="";
	while(4869){
		cin>>word;
		ascl=word;
		if(ascl==0){
		cout<<0;
		}
		while(ascl>0){
			last=ascl%16;
			if(last<10)
			code=char('0'+last)+code;
			else
			code=char('A'-10+last)+code;
			ascl=ascl/16;   
		}
		cout<<code;
		code="";
	}
	
	return/*191981*/0;
}
2024/3/2 21:35
加载中...