摘要: import java.util.Scanner; class Main { public static void main(String[] args){ int countOf0 = 0; int countOf1 = 0; for(int i = 0; i < 1000_000; i++){ 阅读全文
posted @ 2022-05-27 16:16 Scenery_Shelley 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 十进制转二进制 import java.util.Scanner; class Main { public static void main(String[] args){ Scanner input = new Scanner(System.in); int numberNotChange = 0 阅读全文
posted @ 2022-05-27 15:24 Scenery_Shelley 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 1. 在线编辑公式 在线LaTeX公式编辑 2. 得到MathML <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mfrac><mn>1</mn><mrow><mn>1</mn><mo>+</mo><msqrt 阅读全文
posted @ 2022-05-27 14:06 Scenery_Shelley 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 找出1-10,000 之间的四个完全数 比如:6 = 1+2+3 28 = 1+2+4+7+14 import java.util.*; class Main { public static void main(String[] args){ for(int i = 1; i <= 10_000; 阅读全文
posted @ 2022-05-27 11:33 Scenery_Shelley 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 取值范围: [0,1) 阅读全文
posted @ 2022-05-27 11:19 Scenery_Shelley 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 复利值 每月存100,年利率5%,存6个,月帐面价值多少? import java.util.*; class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); System 阅读全文
posted @ 2022-05-27 11:13 Scenery_Shelley 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 显示每月第一天是星期几 输入年份 import java.util.*; import javax.swing.*; class Main { public static void main (String[] args){ Scanner input = new Scanner(System.in 阅读全文
posted @ 2022-05-26 13:50 Scenery_Shelley 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 1+1/2+1/3+…+1/n 从右往左更加精确 import java.util.Scanner; class Main { public static void main(String[] args){ int n = 50_000; double sum = 0; for(int i = 1; 阅读全文
posted @ 2022-05-26 12:07 Scenery_Shelley 阅读(49) 评论(0) 推荐(0) 编辑
摘要: 比较不同利率下的贷款 import java.util.Scanner; class Main { public static void main(String[] args) { //Create a Scanner Scanner input = new Scanner(System.in); 阅读全文
posted @ 2022-05-25 15:21 Scenery_Shelley 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 数字金字塔 import java.util.*; class Main { public static void main(String[] args){ Scanner input = new Scanner(System.in); System.out.print("Enter the lin 阅读全文
posted @ 2022-05-25 12:36 Scenery_Shelley 阅读(94) 评论(0) 推荐(0) 编辑