摘要: A user inputs a long number M. You need to find out what is the smallest long *n*, so that *n*! >= *M*. Use the BigInteger class to solve the problem. 阅读全文
posted @ 2020-08-13 09:09 longlong6296 阅读(95) 评论(0) 推荐(0)
摘要: Each number can be broken down into parts, or addends. For example, number 3 may be broken down into such addends as 1 + 1 + 1, 2 + 1, 3. This procedu 阅读全文
posted @ 2020-08-12 13:13 longlong6296 阅读(161) 评论(0) 推荐(0)
摘要: Write a method named addValueByIndex. The method should take an array of longs and add value to the specified element by its index. Here is a descript 阅读全文
posted @ 2020-08-12 09:54 longlong6296 阅读(165) 评论(0) 推荐(0)
摘要: Write a method that tests the given number is composite or not. The composite number is a positive integer that has at least one divisor other than 1 阅读全文
posted @ 2020-08-12 08:16 longlong6296 阅读(99) 评论(0) 推荐(0)
摘要: Write a method that calculates the factorial of a given number. The factorial of n is calculated by the product of integer number from 1 to n (inclusi 阅读全文
posted @ 2020-08-12 08:03 longlong6296 阅读(83) 评论(0) 推荐(0)
摘要: Read an integer number N from the input and print all the squares of natural numbers: less than or equal to N, in ascending order. Sample Input 1: 50 阅读全文
posted @ 2020-08-11 14:35 longlong6296 阅读(76) 评论(0) 推荐(0)
摘要: We need your help to improve an adaptive system. There's a program that asks learners what programming language they are learning. There are four opti 阅读全文
posted @ 2020-08-11 14:34 longlong6296 阅读(131) 评论(0) 推荐(0)
摘要: The password is hard to crack if it contains at least A uppercase letters, at least B lowercase letters, at least C digits and includes exactly N symb 阅读全文
posted @ 2020-08-11 14:30 longlong6296 阅读(150) 评论(0) 推荐(0)