Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- )
- func main() {
- var n,tmp int
- count := 0
- fmt.Scanf("%d", &n)
- aux := make([]int, n+1)
- for i := 0; i < n; i++ {
- fmt.Scanf("%d", &tmp)
- if aux[tmp] == 0 {
- count++
- aux[tmp] = 1
- }
- }
- }
Add Comment
Please, Sign In to add comment