码迷,mamicode.com
首页 >  
搜索关键字:reverse integer    ( 19410个结果
java每日小算法(9)
/*【程序9】 题目:一个数如果恰好等于它的因子之和,这个数就称为"完数"。例如6=1+2+3.编程找出1000以内的所有完数。*/ packagetest; importjava.util.ArrayList; importjava.util.List; publicclasstest{ publicstaticbooleanovernum(intnumber){ List<Integer>list=..
分类:编程语言   时间:2014-05-27 03:34:38    阅读次数:245
java每日小算法(7)
/*【程序7】 题目:输入一行字符,分别统计出其中英文字母、空格、数字和其它字符的个数。 1.程序分析:利用while语句,条件为输入的字符不为‘\n‘.*/ packagetest; importjava.util.ArrayList; importjava.util.List; publicclasstest{ publicstaticList<Integer>countstr..
分类:编程语言   时间:2014-05-27 03:32:01    阅读次数:375
【LeetCode】Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link...
分类:其他好文   时间:2014-05-23 07:43:23    阅读次数:246
Digital Roots,函数
Digital Roots 时间限制: 1 Sec  内存限制: 128 MB 提交: 91  解决: 29 [提交][状态][论坛] 题目描述 The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single d...
分类:其他好文   时间:2014-05-22 13:01:21    阅读次数:223
每日算法之十一:Integer to Roman
题目:Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 罗马表示方式如下: I = 1; V = 5; X = 10; L = 50; C = 100; D = 500; M = 1000; 其中每...
分类:其他好文   时间:2014-05-22 13:00:09    阅读次数:240
UVA - 11610 Reverse Prime
题意:首先定义了一种叫做Reverse Prime的数:是一个7位数,倒置后是一个   然后要把所有的Reverse Prime求出来,排好序。   然后题目有2种操作:   q x :求编号0到编号x的Reverse Prime的质因数个数的和   d x :从表中删掉x(x是一个Reverse Prime) 思路:首先筛选出所有的素数,然后倒置,因为我们的素数都是#include...
分类:其他好文   时间:2014-05-22 09:29:54    阅读次数:274
Oracle 表的创建 及相关参数
1、 创建表完整语法 CREATE TABLE [schema.]table (column datatype [, column datatype] … ) [TABLESPACE tablespace] [PCTFREE integer] [PCTUSED integer] [INITRANS integer] [MAXTRANS integer] [STORAGE sto...
分类:数据库   时间:2014-05-22 06:25:53    阅读次数:384
如何将阿拉伯数字每三位一逗号分隔,如:15000000转化为15,000,000
"15000000".split("").reverse().join("").replace(/(\d{3})/g, "$1,").split("").reverse().join("");"115000000".split("").reverse().join("").replace(/(\d{...
分类:其他好文   时间:2014-05-22 05:04:27    阅读次数:357
winform学习日志(二十九)----------根据标点符号分行,StringBuilder的使用;将字符串的每个字符颠倒输出,Reverse的使用
一:根据标点符号分行,上图,代码很简单二:代码using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.L...
分类:Windows程序   时间:2014-05-22 04:53:54    阅读次数:469
2013年北京师范大学新生程序设计竞赛网络赛--D. Number theory(模拟取余)
D. Number theory Time Limit: 1000ms Case Time Limit: 1000ms Memory Limit: 65536KB 64-bit integer IO format: %lld      Java class name: Main Submit Status PID: 34055 Font Size:  + ...
分类:其他好文   时间:2014-05-20 16:24:12    阅读次数:245
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!