tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
|
|
@ -0,0 +1,21 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/big"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func main () {
|
||||
s := strconv.FormatInt(26, 16) // returns the string "1a"
|
||||
fmt.Println(s)
|
||||
|
||||
i, err := strconv.ParseInt("1a", 16, 64) // returns the integer (int64) 26
|
||||
if err == nil {
|
||||
fmt.Println(i)
|
||||
}
|
||||
b, ok := new(big.Int).SetString("1a", 16) // returns the big integer 26
|
||||
if ok {
|
||||
fmt.Println(b)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue