Skip to main content
Commonmark migration
Source Link

Go, 59 Bytes

package main
import"fmt"
func main(){fmt.Printf("%118d",0)}

Prints 0 formatted with padding

###Here is a version with argument (145-25 Bytes):

Here is a version with argument (145-25 Bytes):

package main
import("os"
"fmt")
func main(){i:=2
if len(os.Args)>1{fmt.Sscanf(os.Args[1],"%d",&i)}
fmt.Printf("%"+fmt.Sprintf("%d",i*145)+"d",i)}

Go, 59 Bytes

package main
import"fmt"
func main(){fmt.Printf("%118d",0)}

Prints 0 formatted with padding

###Here is a version with argument (145-25 Bytes):

package main
import("os"
"fmt")
func main(){i:=2
if len(os.Args)>1{fmt.Sscanf(os.Args[1],"%d",&i)}
fmt.Printf("%"+fmt.Sprintf("%d",i*145)+"d",i)}

Go, 59 Bytes

package main
import"fmt"
func main(){fmt.Printf("%118d",0)}

Prints 0 formatted with padding

Here is a version with argument (145-25 Bytes):

package main
import("os"
"fmt")
func main(){i:=2
if len(os.Args)>1{fmt.Sscanf(os.Args[1],"%d",&i)}
fmt.Printf("%"+fmt.Sprintf("%d",i*145)+"d",i)}
fixed wrong length
Source Link

Go, 5859 Bytes

package main
import"fmt"
func main(){fmt.Printf("%58d""%118d",0)}

Prints 0 formatted with padding

###Here is a version with argument (145-25 Bytes):

package main
import("os"
"fmt")
func main(){i:=2
if len(os.Args)>1{fmt.Sscanf(os.Args[1],"%d",&i)}
fmt.Printf("%"+fmt.Sprintf("%d",i*145)+"d",i)}

Go, 58 Bytes

package main
import"fmt"
func main(){fmt.Printf("%58d",0)}

Prints 0 formatted with padding

###Here is a version with argument (145-25 Bytes):

package main
import("os"
"fmt")
func main(){i:=2
if len(os.Args)>1{fmt.Sscanf(os.Args[1],"%d",&i)}
fmt.Printf("%"+fmt.Sprintf("%d",i*145)+"d",i)}

Go, 59 Bytes

package main
import"fmt"
func main(){fmt.Printf("%118d",0)}

Prints 0 formatted with padding

###Here is a version with argument (145-25 Bytes):

package main
import("os"
"fmt")
func main(){i:=2
if len(os.Args)>1{fmt.Sscanf(os.Args[1],"%d",&i)}
fmt.Printf("%"+fmt.Sprintf("%d",i*145)+"d",i)}
Source Link

Go, 58 Bytes

package main
import"fmt"
func main(){fmt.Printf("%58d",0)}

Prints 0 formatted with padding

###Here is a version with argument (145-25 Bytes):

package main
import("os"
"fmt")
func main(){i:=2
if len(os.Args)>1{fmt.Sscanf(os.Args[1],"%d",&i)}
fmt.Printf("%"+fmt.Sprintf("%d",i*145)+"d",i)}