码迷,mamicode.com
首页 >  
搜索关键字:integer    ( 14932个结果)
POJ2407---Relatives(求单个数的欧拉函数)
Description Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if there are no integers x > 1, y > 0, z > 0 such t...
分类:其他好文   时间:2015-06-04 22:54:18    阅读次数:175
POJ 1852 Ants
AntsTime Limit: 1000msMemory Limit: 30000KBThis problem will be judged onPKU. Original ID:185264-bit integer IO format:%lld Java class name:MainAn arm...
分类:其他好文   时间:2015-06-04 22:19:00    阅读次数:100
Digital Roots
Description The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that d...
分类:其他好文   时间:2015-06-04 19:18:39    阅读次数:114
Rightmost Digit(快速幂)
DescriptionGiven a positive integer N, you should output the most right digit of N^N. InputThe input contains several test cases. The first line of th...
分类:Web程序   时间:2015-06-04 18:50:26    阅读次数:160
ruby字符串处理
字符串处理函数 1.返回字符串的长度 str.length?=>?integer ? 2.判断字符串中是否包含另一个串 str.include??other_str?=>?true?or?false"hello".include??"lo"???#=>?true"hello".include??"ol"?...
分类:其他好文   时间:2015-06-04 17:38:58    阅读次数:117
leetcode - Missing Ranges
题目: Missing Ranges Given a sorted integer array where the range of elements are [0, 99]inclusive, return its missing ranges. For example, given [0, 1, 3, 50, 75], return[“2”, “4->49”, “51->74”, “...
分类:其他好文   时间:2015-06-04 17:12:21    阅读次数:114
HDU ACM 1047 Integer Inquiry->大数相加
分析:注意格式的处理。 #include using namespace std; #define N 110 int op[N],sum[N]; char in[N]; void SUM() { int i,len; memset(sum,0,sizeof(sum)); while(scanf("%s",in)&& strcmp(in,"0")) { memset(op,0...
分类:其他好文   时间:2015-06-04 15:43:21    阅读次数:220
为什么编程时间从1970年1月1日开始?
最初计算机操作系统是32位,而时间也是用32位表示。 System.out.println(Integer.MAX_VALUE); 2147483647 Integer在JAVA内用32位表示,因此32位能表示的最大值是2147483647。另外1年365天的总秒数是31536000, 2147483647/31536000 = 68.1 也就是说32位能表示的最长时间是68年,而实际上...
分类:其他好文   时间:2015-06-04 11:48:20    阅读次数:139
Project Euler:Problem 39 Integer right triangles
If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120. {20,48,52}, {24,45,51}, {30,40,50} For which value of p ≤ 1000, is...
分类:其他好文   时间:2015-06-04 11:47:49    阅读次数:107
hdu 3709 数位dp(小思维)
http://acm.hdu.edu.cn/showproblem.php?pid=3709 Problem Description A balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specifically, imagi...
分类:其他好文   时间:2015-06-04 08:38:15    阅读次数:129
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!