- 博客(4)
- 收藏
- 关注
原创 判断一个数是不是3的次幂
class Solution { public boolean isPowerOfThree(int n) { int a=0; if(n!=0 && n>0){ for(int i=1;i<=19;i++){ a=(int)Math.pow(3,i); } if(a%n==0 || a+1%n==3){ .
2022-04-12 22:57:39
460
1
原创 为什么这段代码会报错,求答
import java.util.Scanner;public class Solution { static int a=0; static int b=0; public static int twoSum(int[] nums) { for (int i=0;i<nums.length;i++){ if(arr[i]==a){ System.out.print("第一个数的下标"+i+" ").
2022-04-08 10:45:14
807
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人