|
|
|
|
背景 Background |
|
|
为了for beginngers,特设此题,^_^
|
|
|
|
|
|
|
|
描述 Description |
|
|
进制数转换(jinzhi.pas)
【问题描述】
进制数转换,例如:(2B3)14=(670)9
【样例输入1】
14 9
2B3
【样例输出1】
670
【数据限制】
100%的数据,1≤n≤16。
|
|
|
|
|
|
|
|
输入格式 Input Format |
|
|
第一行两个整数,1空格分开,第1个是已知的进制x,第2个是要转换为的进制y。
第二行为该已知的进制数。
|
|
|
|
|
|
|
|
输出格式 Output Format |
|
|
输出:1行只有1个数为转换后的进制数。 |
|
|
|
|
|
|
|
时间限制 Time Limitation |
|
|
各个测试点1s
|
|
|
|
|
|
|
|
注释 Hint |
|
|
Free Pascal Code:
-------------------
program Plus;
var a,b:longint;
begin
readln(a,b);
writeln(a+b);
end.
C++ Code:
-------------------
#include <iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<a+b<<endl;
return 0;
}
|
|
|
|
|
|
|
|
|
Flag |
|
题号 |
P1085 |
|
其它 |
通过 |
18人 |
提交 |
68次 |
通过率 |
26% |
难度 |
0 |
|
|
|
|
|
|