天真小巫


私信TA

用户名:w1234567890l

访问量:5088

签 名:

追光者

等  级
排  名 390
经  验 4951
参赛次数 4
文章发表 68
年  龄 20
在职情况 学生
学  校 西安邮电大学
专  业 智能科学与技术

  自我简介:

我不爱笑,不爱逞强,天真无邪。

解题思路:

注意事项:

参考代码:

package c.dopp;

import java.util.Scanner;

public class math {
   public static void main(String[] args) {
       Scanner sc= new Scanner(System.in);

       while(sc.hasNext())
       { int n=sc.nextInt();
           int m=sc.nextInt();

           long result1=1,i,result2=1;


       for(i=n;i>n-m;i--)
       {
           result1*=i;

       }
       for(i=1;i<=m;i++)
           result2*=i;
       System.out.println(result1/result2);
        }

   }
}

 

0.0分

0 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区