Submission #929427


Source Code Expand

Copy
import java.util.Scanner;

public class Main{

int ruijo(int n, int r){
  if(r == 0) return 1;
  else return n*ruijo(n,r-1);
}

  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt(), K = sc.nextInt();
    System.out.println(K*ruijo(N-1,K-1));
  }
}

Submission Info

Submission Time
Task B - Painting Balls with AtCoDeer
User rit03cv
Language Java8 (OpenJDK 1.8.0)
Score 0
Code Size 316 Byte
Status CE

Compile Error

./Main.java:13: error: non-static method ruijo(int,int) cannot be referenced from a static context
    System.out.println(K*ruijo(N-1,K-1));
                         ^
1 error