派仔
派仔
全部文章
题解
归档
标签
去牛客网
登录
/
注册
Lincs
Do more, know more, be more
全部文章
/ 题解
(共68篇)
求最小公倍数
import java.util.Scanner; public class Main { private int gcd(int a, int b) { if (b == 0) return a; return a % b == 0 ? b : gcd(...
2020-08-07
2
804
求最大连续bit数
import java.util.Scanner; public class Main { private int countBiggestOf1(int n) { int res = 0; int temp = 0; while (n !...
2020-08-07
1
649
计算日期到天数转换
import java.util.Scanner; public class Main { private int leapMonth[] = {0, 31,29,31,30,31,30,31,31,30,31,30,31}; private int normalMonth[] ...
Java
2020-08-07
3
863
查找输入整数二进制中1的个数
import java.util.Scanner; public class Main { private int findNumberOf1( int num) { int count = 0; while (num != 0) { ...
2020-08-07
1
759
输入一行字符,分别统计出包含英文字母、空格、数字和其它字符的个数。
import java.util.Scanner; public class Main { /** * 统计出英文字母字符的个数。 */ public int getEnglishCharCount(String str) { int c...
2020-08-07
0
578
统计每个月兔子的总数
import java.util.Scanner; public class Main { private int getTotalCount(int n) { int[] f = new int[n + 1]; f[0] = 0; f[1...
2020-08-07
2
839
最长公共子序列
import java.util.Scanner; public class Main { private String lcs(String s, String t) { int m = s.length(), n = t.length(); int[]...
2020-08-07
1
639
汽水瓶
import java.util.Scanner; public class Main { private int cal(int number) { int bottoms = 0; while (number >= 3) { ...
2020-08-07
14
1128
[Java] 取近似值
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); doubl...
Java
2020-08-07
367
16800
字符个数统计
import java.util.Scanner; import java.util.Set; import java.util.HashSet; public class Main { public Main() { Scanner in = new Scanner(...
2020-08-07
2
699
首页
上一页
1
2
3
4
5
6
7
下一页
末页