解题思路:
(1)找到对应关系,26进制,1对应A(对应的ASCII码为65)
(2)不难看出规律为: Char temp=(n-1)%26+'A' ,或者 Char temp=(n-1)%26+65
(3)使用while循环进行对应位的分离与处理...
分类:
其他好文 时间:
2015-06-23 10:14:31
阅读次数:
94
解题思路:
(1)使用splt(“\\.”)对应小数点进行分离,然后逐个比较
(2)比较过程中,我们假定数组的长度一致。长度较短的数组,当比较到最后一个元素以后,往后自动加0操作...
分类:
其他好文 时间:
2015-06-23 10:14:03
阅读次数:
89
java.math包中提供了两个大数字操作类:BigInteger(大整数操作类) BigDecimal(大小数操作类).大整数操作类:BigIntegerBigInteger类构造方法:public BigInteger(String val)常用方法:public BigInteger add(...
分类:
编程语言 时间:
2015-06-22 13:36:05
阅读次数:
138
解题思路:
A—Z 26个字母,AA出现27,则进制为26,。因此只需将给定字符串从高为到低位依次遍历,然后运算即可。...
分类:
其他好文 时间:
2015-06-22 11:10:14
阅读次数:
135
Cube点我Problem DescriptionCowl is good at solving math problems. One day a friend asked him such a question: You are given a cube whose edge length is ...
分类:
其他好文 时间:
2015-06-21 20:54:22
阅读次数:
183
题目链接:https://leetcode.com/problems/palindrome-number/
Determine whether an integer is a palindrome. Do this without extra space.
click to show spoilers.
Some hints:
Could negative inte...
分类:
其他好文 时间:
2015-06-21 15:52:27
阅读次数:
145
题目链接:https://leetcode.com/problems/string-to-integer-atoi/
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, ple...
分类:
其他好文 时间:
2015-06-21 14:30:06
阅读次数:
142
1 --设置随机数种子 2 math.randomseed(os.time()) 3 math.random() 4 5 print("猜数字游戏(0-100)") 6 7 local limit = 6 8 local answer = math.random(0,100) 9 10 whi...
分类:
其他好文 时间:
2015-06-21 14:19:32
阅读次数:
147
题意: 给n(<=250)条水平网格,然后在上面放k棋子,每行每列都只能放一个。求方法总数。Solution: 简单的DP, 只要对给出的水平长度排个序就很容易处理了。 需要用到高精度。偷懒用java写了import java.util.*;import java.math.*;publi...
分类:
其他好文 时间:
2015-06-21 14:18:00
阅读次数:
112
要使用任何Python模块,都必须先导入:有两种导入及使用方式:一 import math math.sqrt(5)//导入模块名,以后使用时要在方法前面加上模块名 二 from math import* log(25+5)//这种方式导入时,如果函数与math模块中的某个函数同名,将被...
分类:
编程语言 时间:
2015-06-21 01:56:23
阅读次数:
141