能帮我看看我的哪里出问题了么?谢谢大佬!(题目:D) public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt();//n猴子 int L=sc.nextInt();//至少拿L个 int R=sc.nextInt();//最多拿R个 int k =R; if (k%n>=0){//有多的 while (R-n>=n){ R--; } int result=R; System.out.println(result-n); }else System.out.println("0"); } }
点赞

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务