codewars070 Sum by Factors 通过因子求和

Instructions 题目说明 题目说明的链接 解体要点 求一个整数的质因子 利用TreeMap的自动排序功能 测试样例 import static org.junit.Assert.*; import org.junit.*; public class SumOfDiv...

2017/07/19 11:13
1K
codewars069 饥饿游戏：动物园的灾难！

The Hunger Games - Zoo Disaster! 本题的解题关键在于理解题意，以及严格按照题意进行准确的字符串处理。在消除被吃掉的动物时，必须是当前动物的左边或右边的动物，这一点必须考虑到，否则...

2017/07/12 16:46
346
codewars068 - Convert string to camel case

Instructions https://www.codewars.com/kata/517abf86da9663f1d2000003/train/java Solution: import java.lang.StringBuilder; class Solution{ static String toCamelCase(String s){...

2017/04/19 17:55
105
codewars067 - Delta Bits

Instructions https://www.codewars.com/kata/538948d4daea7dc4d200023f/train/java Solution: public class DeltaBits { public static int convertBits(int a, int b) {   String...

2017/04/19 17:30
68
codewars066 - Large Factorial

Instructions https://www.codewars.com/kata/557f6437bf8dcdd135000010/train/java Solution: import java.math.BigInteger; public class Kata { public static String Factorial(int...

2017/04/13 11:37
166

Instructions https://www.codewars.com/kata/5539fecef69c483c5a000015/train/java Solution: public class BackWardsPrime {         public static String backwardsPrime(long start, lon...

2017/04/13 11:21
219
codewars064 - Get the Excel column title!

Instructions https://www.codewars.com/kata/get-the-excel-column-title/train/java Solution: import java.util.Stack; public class GetExcelColumnTitle { private static final  Str...

2017/04/12 16:26
28
codewars063 - Give me a Diamond

Instructions https://www.codewars.com/kata/5503013e34137eeeaa001648/train/java Solution: class Diamond { public static String print(int n) {     if (n % 2 == 0 || n < 0) {       ...

2017/04/12 14:48
151
codewars062 - Fizz Buzz Cuckoo Clock

Instructions https://www.codewars.com/kata/fizz-buzz-cuckoo-clock/train/java Solution: public class FizzBuzzCuckooClock { public static String fizzBuzzCuckooClock(String ti...

2017/04/11 15:50
252
codewars061 - Resistor Color Codes

Instructions https://www.codewars.com/kata/resistor-color-codes/train/java Solution: import java.util.HashMap; import java.util.Map; public class DecodeResistorColors {   priva...

2017/04/11 10:13
21
codewars060 - Resistor Color Codes, Part 2

Instructions https://www.codewars.com/kata/5855777bb45c01bada0002ac/train/java Solution import java.util.HashMap; import java.util.Map; public class EncodeResistorColors { priv...

2017/04/10 17:16
95
codewars059 - Create Phone Number

Instructions Link Solution: public class Kata{ public static String createPhoneNumber(int[] numbers){ return String.format("(%d%d%d) %d%d%d-%d%d%d%d", numbers[0]...

2017/04/10 14:38
174
codewars058: Which are in?

Instructions: Link Solution: import java.util.*; public class WhichAreIn{ public static String[] inArray(String[] array1, String[] array2){ List<String> list = new A...

2017/03/28 15:04
103
Fun with trees: max sum

2017/01/20 19:05
127
codewas057: 最大和子数组

Instructions: Maximum subarray sum Solution: public class Max{ public static int sequence(int[] arr){ if(arr == null || arr.length == 0){ return 0; ...

2017/01/13 14:30
24

Instructions Buying a car Solution: //https://www.codewars.com/kata/554a44516729e4d80b000012/train/java import java.math.BigDecimal; public class BuyCar{ public static int[]...

2017/01/13 11:33
119
codewars054: Who won the election?

2017/01/12 18:14
26
codewars053: 数根

Sum of Digits / Digital Root

2017/01/12 17:35
159
codewars052: 幸存者: 约瑟夫环问题

2017/01/12 16:42
101