跳到正文

算法·理论

进制转换

#SUSPENDED#约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年5月23日
篇幅
约 1 分钟

版本

  1. v1当前
C++
#include<bits/stdc++.h>
using namespace std;
int main(){
	ios::sync_with_stdio(0);cin.tie(0);
	int t;cin>>t;
	while(t--){
		int n;char s[114];char *ed;
		cin>>n>>s;
		long long a=strtol(s,&ed,n);
		cout<<a<<endl;
	}
	return 0;
}
原文