public class F { public static void main(String[] args) { /**截取字符串,第4位以后的字符串用*代替*/ String s = "Hello Java World"; System.out.println("直接输出:" + s); String a = s.substring(4,s.length()); for (int i = 0;i < a.length() ; i++){ a = a.rep
阶乘之和输入n,计算S=1!+2!+3!+…+n!的末6位(不含前导0).n≤10 6 ,n!表示前n个正整数之积.样例输入:10样例输出: package demo; import java.util.Scanner; public class demo02 { public static void main(String[] args) { Scanner in=new Scanner(System.in); int n=in.nextInt(); long sum=0; for (int
string str = "akdjkaflajfaljfqpjwojhflkjallaajfjadjlajdaffksbvcalihwhkqekq12304010580473639601"; int sum = str.Length; Console.WriteLine(sum);//计算字符串的长度,sum=80,可以不输出sum的结果. Random r = new Random(); //先从0到79中随机生成一个数. int i1 = r.Next(79); int i2 =