咳咳.....这题有点诡异

魈凯KBS  •  4个月前


怎么说呢 ,这题坑真滴很多

要么在DEV那里AC不了

结果跑到MAG却运行成功了

ε=(´ο`*)))唉,总之特别神奇

#include

#include<stack>
using namespace std;
stack <int> ans;
int main(){
	int n,m;
	cin>>n>>m;
	if (n == 0){
		ans.push(0);
	}
	while (n > 0){
		ans.push(n % m);
		n /= m;
	}
	while (!ans.empty()){
		if (ans.top() >= 10){
			putchar((char)(ans.top() - 10 + 'A'));
		}
		else{
			cout<<ans.top();
		}
		ans.pop();
	}
	return 0;
}

评论:

请问你的#include<iostream>呢?

另外

望丰展?使MD

吴悠  •  4个月前

支持正版,抵制抄袭

懒得放图片了,自己看


临时1  •  4个月前

byd什么实力还复制我的题解


陈志轩  •  4个月前