|
|
@@ -6,7 +6,6 @@ import (
|
|
|
"os"
|
|
|
"strings"
|
|
|
"strconv"
|
|
|
- "math"
|
|
|
)
|
|
|
|
|
|
|
|
|
@@ -20,7 +19,6 @@ func main(){
|
|
|
}
|
|
|
|
|
|
lines := strings.Split(string(content),"\n")
|
|
|
- fmt.Println(lines)
|
|
|
|
|
|
|
|
|
for index, itr := range(lines){
|
|
|
@@ -38,18 +36,21 @@ func main(){
|
|
|
dial = dial - tmp
|
|
|
}else{
|
|
|
tmp, err := strconv.Atoi(itr[1:])
|
|
|
-
|
|
|
if err != nil {
|
|
|
log.Fatal(err)
|
|
|
}
|
|
|
-
|
|
|
dial = dial - tmp
|
|
|
}
|
|
|
- dial = dial % 100
|
|
|
- dial = math.Abs(dial)
|
|
|
- fmt.Printf("%v \n",dial)
|
|
|
|
|
|
- if dial == 0 {
|
|
|
+ for dial > 100{
|
|
|
+ dial = dial - 100
|
|
|
+ }
|
|
|
+
|
|
|
+ for dial < 0 {
|
|
|
+ dial = dial + 100
|
|
|
+ }
|
|
|
+
|
|
|
+ if dial == 0 {
|
|
|
cnt++
|
|
|
}
|
|
|
|