No difference found
소 감 ¶
코 드 ¶
package main import ( "fmt" ) func main(){ var ssn2 string var remainder int sumtemp := 0 fmt.Scanf("%s",&ssn2) ssn :=[]rune(ssn2) for i:=0;i<8;i++{ sumtemp += (int(ssn[i])- '0')*(i+2) } for i:=8;i<12;i++{ sumtemp += (int(ssn[i])- '0')*(i-6) } remainder = sumtemp%11 remainder = 11-remainder if remainder==10 { remainder = 0 } if remainder == (int(ssn[12])- '0') { fmt.Println("대한민국 국민이네요~ ^^ 안녕하세요") }else { fmt.Println("혹시 간첩???? -_-;; ") } }