Last active
July 28, 2018 09:33
-
-
Save genya0407/5d05838133ea43f18982d909e664a5bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
res1 = 1 | |
for i in range(1,100001): | |
res1 = res1 * i | |
for j in range(0, 5): | |
print(str(res1)[:15]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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