U E D R , A S I H C RSS

이태균/LittleAOI/파스칼삼각형

No difference found



소 감



코 드


package main

import "fmt"

func combi(n int, r int) int {
	return facto(n) / (facto(n-r)*facto(r))
}

func facto (n int) int {
	if (n>0){
		return n*facto(n-1)

	}else {
		return 1
	}
}


func main(){
	var a,b int
	fmt.Scanf("%d %d",&a,&b)
	fmt.Println(combi(a,b))
}

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:30:34
Processing time 0.0323 sec