Skip to content

Instantly share code, notes, and snippets.

@genya0407
Last active July 28, 2018 09:33
Show Gist options
  • Save genya0407/5d05838133ea43f18982d909e664a5bf to your computer and use it in GitHub Desktop.
Save genya0407/5d05838133ea43f18982d909e664a5bf to your computer and use it in GitHub Desktop.
package main
import "fmt"
import "math/big"
func main() {
res1 := big.NewInt(1)
for i := 1; i <= 100000; i++ {
res1.Mul(res1, big.NewInt(int64(i)))
}
for j := 0; j < 5; j++ {
fmt.Printf("%s", res1.String()[:15])
}
}
res1 = 1
for i in range(1,100001):
res1 = res1 * i
for j in range(0, 5):
print(str(res1)[:15])
res1 = 1
(1..100000).each do |i|
res1 = res1 * i
end
(1..5).each do
puts res1.to_s[0..14]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment