-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
45 lines (41 loc) · 830 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package main
import (
"fmt"
"math"
"reflect"
"sort"
)
func main() {
//1544
fmt.Println(math.Abs(float64('P' - 'p')))
//42
m := make(map[int][]int)
// m[0] = append(m[0], 0)
// m[1] = append(m[1], 1)
// m[0] = append(m[0], 2)
// m[2] = append(m[2], 3)
// m[1] = append(m[1], 4)
// m[0] = append(m[0], 5)
// m[1] = append(m[1], 6)
// m[3] = append(m[3], 7)
// m[2] = append(m[2], 8)
// m[1] = append(m[1], 9)
// m[2] = append(m[2], 10)
// m[1] = append(m[1], 11)
m[4] = append(m[4], 0)
m[2] = append(m[2], 1)
m[0] = append(m[0], 2)
m[3] = append(m[3], 3)
m[2] = append(m[2], 4)
m[5] = append(m[5], 5)
h := []int{}
for k := range m {
h = append(h, k)
}
sort.Sort(sort.IntSlice(h))
for _, v := range h {
println(v)
}
args := reflect.New(reflect.TypeOf(5))
fmt.Println("args:", args.Type())
}