poj 1220 NUMBER BASE CONVERSION
NUMBER BASE CONVERSION
Description Write a program to convert numbers in one base to numbers in a second base. There are 62 different digits:
{ 0-9,A-Z,a-z } HINT: If you make a sequence of base conversions using the output of one conversion as the input to the next, when you get back to the original base, you should get the original number. Input The first line of input contains a single positive integer. This is the number of lines that follow. Each of the following lines will have a (decimal) input base followed by a (decimal) output base followed by a number expressed in the input base. Both the input base and the output base will be in the range from 2 to 62. That is (in decimal) A = 10, B = 11, ..., Z = 35, a = 36, b = 37, ..., z = 61 (0-9 have their usual meanings).
Output The output of the program should consist of three lines of output for each base conversion performed. The first line should be the input base in decimal followed by a space then the input number (as given expressed in the input base). The second output line should be the output base followed by a space then the input number (as expressed in the output base). The third output line is blank.
Sample Input 8 Sample Output 62 abcdefghiz #include<cstdio> |
poj 1220 NUMBER BASE CONVERSION的更多相关文章
- poj 1220 NUMBER BASE CONVERSION(短除法进制转换)
题目连接:1220 NUMBER BASE CONVERSION 题目大意:给出两个进制oldBase 和newBase, 以及以oldBase进制存在的数.要求将这个oldBase进制的数转换成ne ...
- POJ 1220 NUMBER BASE CONVERSION(较复杂的进制转换)
题目链接 题意 : 给你一个a进制的数串s,让你转化成b进制的输出. A = 10, B = 11, ..., Z = 35, a = 36, b = 37, ..., z = 61,0到9还是原来的 ...
- (高精度运算4.7.26)POJ 1220 NUMBER BASE CONVERSION(高精度数的任意进制的转换——方法:ba1----->10进制----->ba2)
package com.njupt.acm; import java.math.BigInteger; import java.util.Scanner; public class POJ_1220_ ...
- NUMBER BASE CONVERSION(进制转换)
Description Write a program to convert numbers in one base to numbers in a second base. There are 62 ...
- POJ1220 Number Base Conversion
题意 Write a program to convert numbers in one base to numbers in a second base. There are 62 differen ...
- SZU:J38 Number Base Conversion
Judge Info Memory Limit: 32768KB Case Time Limit: 1000MS Time Limit: 1000MS Judger: Number Only Judg ...
- [POJ1220]NUMBER BASE CONVERSION (高精,进制转换)
题意 任意进制之间的高进的转换 思路 相模倒排,高精处理 代码 我太弱了,下面附一个讨论里发的maigo思路的代码 ],A[]; ],d[]; main(){ for(scanf("%d&q ...
- Base Conversion In PHP and javascript
http://www.exploringbinary.com/base-conversion-in-php-using-built-in-functions/ http://www.binarycon ...
- Poj 1019 Number Sequence( 数据分析和操作)
一.题目大意 有这样一个序列包含S1,S2,S3...SK,每一个Si包括整数1到 i.求在这个序列中给定的整数n为下标的数. 例如,前80位为1121231234123451234561234567 ...
随机推荐
- MySql 之 FIND_IN_SET 和IN
CREATE TABLE `test` ( `id` int(8) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `list ...
- 20-取石子动态规则(hdu2516 斐波那契博弈)
http://acm.hdu.edu.cn/showproblem.php?pid=2516 取石子游戏 Time Limit: 2000/1000 MS (Java/Others) Memor ...
- javac老提示无效的标记
加上-cp libs/*后,就开始提示无效的标记,搞了半天,似乎是shell展开的问题,估计是把后面的jar文件当源文件了? 加上引号就行了-cp "libs/*",不让shell ...
- 一步一步带你构建第一个 Laravel 项目
参考链接:https://laravel-news.com/your-first-laravel-application 简介 按照以下的步骤,你会创建一个简易的链接分享网站. 安装 Laravel ...
- linux学习1----初涉linux
linux因其稳定高效的特点,受到很多开发者的青睐,因此将其作为服务器的操作系统. 作为一名开发者,程序员,掌握了一定的linux知识和技巧,程序的开发部署和运行也有不小的帮助. linux由于其开源 ...
- 第16章-使用Spring MVC创建REST API
1 了解REST 1.1 REST的基础知识 REST与RPC几乎没有任何关系.RPC是面向服务的,并关注于行为和动作:而REST是面向资源的,强调描述应用程序的事物和名词. 为了理解REST是什么, ...
- phpmyadmin安全预防
头疼的安全 之前服务器总是本人黑,千疮百孔,只能一步步的去做一些安全防范,如何防范自然先从如何渗透开始. 文章及建议 前段时间看到了个phpmyadmin提权的教程,很多人都说现在那里还有root帐号 ...
- 编写高质量代码改善C#程序的157个建议——建议36:使用FCL中的委托声明
建议36:使用FCL中的委托声明 FCL中存在3类这样的委托声明,它们分别是:Action.Func.Predicate.尤其是在它们的泛型版本出来以后,已经能够满足我们在实际编码过程中的大部分需求. ...
- 解决iReport打不开的一种方法
解决iReport打不开的一种方法 iReport版本:iReport-5.6.0-windows-installer.exe 系统:Win7 64位 JDK:1.7 在公司电脑安装没问题,能打开,但 ...
- Android 动态改变图片的颜色值
public void onViewClicked(View view) { switch (view.getId()) { case R.id.bt1: img1.setColorFilter(ge ...