Below zero problem

Report a typo

Your friend Max Planck is experimenting with electricity and has made a circuit that measures voltage across a circuit section. Further, this binary number in the form of a string is fed to the input of the program.

But here's the problem - it's more convenient to work with decimal numbers in the output! He tried make the program and it worked. But a sudden surge of electricity replaced part of the program with question marks. Now he has no time and your task is to help correct the program and make a breakthrough in physics.

Be sure to use the base argument for the function Parse that matches the binary format of the input.

Sample Input 1:

10011

Sample Output 1:

19
Write a program in Go
package main

import (
"fmt"
"strconv"
)

const bitSize = 64

func main() {
var data string
fmt.Scanln(&data)

num, err := strconv.?(?, ?, bitSize)
if err == nil {
fmt.Println(num)
}
}
___

Create a free account to access the full topic