Welcome![Sign In][Sign Up]
Location:
Search - java Large Integer

Search list

[JSP/JavaBigIntMultiplication

Description: 大整数乘法例子代码 /* 递归边界,如果是1位二进制数与1位二进制数相乘,则可以直接计算 */ /*累计做1位二进制乘法运算的次数*/ /* return (X*Y) */ /* 计算n的值 */ /* 把X和Y拆分开来,令X=A*2^(n/2)+B, 左移位运算,mod = 1<<(n/2) */ /* 计算XY=AC*2^n+(AD+CB)*2^(n/2)+BD */ /* 计算A*C,再向左移n位 */ /* 递归计算A*D */ /* 递归计算C*B */ /* 计算a21+a22,再向左移n/2位 */ /* 递归计算B*D */ /* XY=a1+a2+a3 */ -large integer multiplication example code/* Recursive border, if it is a binary number with a binary number multiplication, can be directly calculated*//* the beginning of a binary multiplication of the number*//* return (X* Y)*//* calculate the value of n*//* X and Y to split it so that X = A* 2 ^ (n/2) B, the left shift operator, mod = 1LT; lt; (n/2)*//* calculate XY = AC* 2 ^ n (AD CB)* 2 ^ (n/2) BD*//* A* C calculation, further n-bits*//* recursive computation A* D*//* recursive calculation of C* B*//* Calculation A21 A22 and then bits n/2*//* recursive calculation B* D*//* XY = a1 a2 a3* /
Platform: | Size: 1024 | Author: 小城 | Hits:

[JSP/Javajava

Description: 输入5个学生的成绩(从0到100的整数),并将这5个数保存到文件“data.txt”中。然后再编写一个程序,从文件“data.txt”中读取这5个学生的成绩,计算并输出它们的平均数,然后再按从小到大的顺序输出这5个学生的成绩。 -The importation of five pupils (from 0 to 100 integer), and 5 the number of files saved to the " data.txt" in. The preparation of a program and then, from the file " data.txt" in which five students to read the results, calculated and their average output, and then the order from small to large output that results of five students.
Platform: | Size: 1024 | Author: kevin | Hits:

[JSP/JavaLargeIntegerOpertion

Description: 这是一个用java编写的大整数加减的算法,可以输出负数,绝对正确可用。-This is a arithmetic of large integer opertion and can print negative number.
Platform: | Size: 4096 | Author: | Hits:

[JSP/Javae9_3

Description: Java 实现超大整数(可大于100位)的加减。-Java to achieve large integer (which can be greater than 100) the addition and subtraction.
Platform: | Size: 4096 | Author: tt | Hits:

[Other Web CodeRSA

Description: JAVA写的可以用RSA加密解密的代码,随机产生密钥,数据格式是长整型,代码包含求逆元、大数取模模块。-Can be written in JAVA RSA encryption and decryption code, randomly generated key, the data format is a long integer, the code contains the inverse element, large numbers modulo module.
Platform: | Size: 2048 | Author: | Hits:

[AlgorithmTestAlgorithm

Description: 求花朵数的JAVA代码实现 一个N位的十进制正整数,如果它的每个位上的数字的N次方的和等于这个数本身,则称其为花朵数。 例如: 当N=3时,153就满足条件,因为 1^3 + 5^3 + 3^3 = 153,这样的数字也被称为水仙花数(其中,“^”表示乘方,5^3表示5的3次方,也就是立方)。 当N=4时,1634满足条件,因为 1^4 + 6^4 + 3^4 + 4^4 = 1634。 当N=5时,92727满足条件。 实际上,对N的每个取值,可能有多个数字满足条件。 程序的任务是:求N=21时,所有满足条件的花朵数。注意:这个整数有21位,它的各个位数字的21次方之和正好等于这个数本身。 如果满足条件的数字不只有一个,请从小到大输出所有符合条件的数字,每个数字占一行。因为这个数字很大,请注意解法时间上的可行性。要求程序在3分钟内运行完毕 -An N-bit decimal integer, if each of its N-bit numbers on the power and is equal to the number itself, called it the number of flowers. For example: When N = 3, the 153 to meet the conditions, because 1 ^ 3+ 5 ^ 3+ 3 ^ 3 = 153, that figure is also known as Narcissus number (where "^" means power, 5 ^ 3 said 5 3 power, which is cubic). When N = 4, the 1634 to meet the conditions, because 1 ^ 6 ^ 4+ 4+ 4+ 4 ^ 3 ^ 4 = 1634. When N = 5, the 92,727 to meet the conditions. In fact, for each N value, there may be multiple numbers to meet the conditions. Program s mission is: find N = 21, all meet the conditions of flower number. Note: This integer has 21 bits, each digit of its 21 th power, and exactly equal to the number itself. If the figures do not meet the conditions of only one, make small to large output of all eligible numbers, each number per line. Because of this high number, please note that the feasibility of solution time. Claims process has finished running in 3 m
Platform: | Size: 2048 | Author: 谷琼 | Hits:

[JSP/JavaMagicSquare

Description: magicCube.jar为可执行文件,需要在java环境下运行,需要计算机配置好jre;在输入页面输入一个正整数,当这个正整数不大于30时,会弹出页面显示幻方;当输入数据大于30时,数字在页面上显示会非常拥挤,不便于查看,所以程序将求出的幻方存储到d:/magicCube.txt文件中,请到该目录下查询。-magicCube.jar for the executable file, you need to run the java environment, you need a computer configured jre in the input page, enter a positive integer, when the positive integers not greater than 30, it will pop up page display magic squares when large input data 30, the number displayed on the page will be very crowded, not easy to see, so the program will find the magic square store to d:/magicCube.txt file, go to the directory query.
Platform: | Size: 414720 | Author: 朱朱 | Hits:

[JSP/Javaexception-handling

Description: 输入输出与异常处理 通过本实验,初步掌握Java中的IO流的用法,并能够在程序中正确使用异常处理语法。 假设文本文件abc1.txt中有一些数据,分为若干行,每行有一些个数不等的整数,用空格隔开。写一个程序读入该文件中的数据,对每行数据从小到大进行排序,然后按行输出到文本文件abc2.txt中,输出的文件中数据的格式与输入文件相同。-Input and output with exception handling through this experiment, the initial master the usage of IO streams in Java, and the proper use of exception handling syntax in the program. Assumptions text file abc1.txt, in some of the data is divided into a number of lines, each line ranging from the number of integer, separated by a space. Write a program that reads the data in the file, and sort each row of data from small to large, and then output to a text file abc2.txt row, the same as the output of the data in the file format of the input file.
Platform: | Size: 13312 | Author: shasha | Hits:

[JSP/JavaIntegerMultiply

Description: 算法分析与设计 用递归分治算法解决大整数乘积问题(java源码)-Algorithm Analysis and Design Recursive divide and conquer algorithm to solve the problem of large integer multiplication. (Java source code)
Platform: | Size: 1024 | Author: jing | Hits:

[JSP/Javajava

Description: 编写一个应用程序,完成一个猜数字的游戏。 随机产生一个1到1000的整数,用户在文本框中输入猜的数字,如果数字比实际数字大则在状态栏中显示“太大了”,反之,则显示“太小了”。如果正确,则打印“恭喜你答对了”,并重新开始游戏。 -Write an application, complete a guessing game. Randomly generate an integer from 1 to 1000, the user enters the number in the text box to guess, if the numbers than the actual figures large in the status bar displays " too big" , on the contrary, it shows " too small." If correct, then print " Congratulations, you got it," and re-start the game.
Platform: | Size: 4819968 | Author: wangyuting | Hits:

[JSPjava

Description: 计算两个大整数的和差积商,并计算出一个大整数的因子个数(因子中不包括1和大整数本身)-Calculate the difference between two large integers and product providers, and calculate the number one factor large integers (factors and are not included in a large integer itself)
Platform: | Size: 4096 | Author: hz | Hits:

[JSP/Javabig_jiecheng

Description: java编程,解决大数据的阶乘运算,一般程序只能承载100以内的阶乘运算,超出则运算错误,该程序不限,只要在整数内都可以运算-Java programming to solve the large data factorial operation, the general procedure can only carry less than 100 factorial operation, beyond the operation error, the program is not limited, as long as the integer can be calculated
Platform: | Size: 4096 | Author: 樱桃 | Hits:

[JSP/Java十种常用排序方法和一道腾讯笔试题

Description: 1.数据结构教材中十种排序方法Java实现 2.[腾讯笔试题]小Q有X首长度为A的不同的歌和B首长度为Y的不同的歌,现在小Q想用 这 些歌组成一个 总 长 度正好 为 K的歌单,每 首 歌最 多只 能在歌单中出现一次,在不考虑歌单内歌曲的先后顺序的情况下,请问有多少种组成歌单的方法。 输入描述: 每个输入包含一个测试用例。 每个测试用例的第一行包含一个整数,表示歌单的总长度K( 1< =K<=1000) 。 接下来的一行包含四个正整数,分别表示歌的第一种长度A(A<=10) 和数量x(X<=100 以及歌的第二种长度B(B<=10) 和数量Y(Y<=100)。保证z不等于3。 输出描述: 输出一个整数,表示组成歌单的方法取模。因为答案可能会很大,输出对000000007取模的结果。 测试数据1: 输入: 5 2 3 3 3 输出:9 测试数据2: 输入: 6 1 6 2 3 输出:92(Q has a different song of the length of X and the length of the first A and the length of the first B is Y. Now Q wants to use these songs to make up a song list with a total length just as K. Input Description: Each input contains a test case. The first line of each test case contains an integer, representing the total length of the song (1< K =K<=1000). The next line contains four positive integers, which represent the first length of the song A (A<=10) and the number of X (X<=100 and the second length B (B<=10) of the song and the number Y (Y<=100). Ensure that z is not equal to 3. Output Description: Output an integer method consisting of the Song said modulo. Because the answer may be large, and output is the result of 000000007 modulus. Test data 1: Input: 5 2 3 3 3 Output: 9 Test data 2: Input: 6 1 6 2 3 Output: 92)
Platform: | Size: 7168 | Author: _马儿 | Hits:

CodeBus www.codebus.net