Created
September 28, 2016 09:14
-
-
Save y16ra/af2e21dd9b15c01c09e6c136282fd582 to your computer and use it in GitHub Desktop.
数値の桁数を求める
This file contains 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
import math | |
n = 100 | |
digits = int(math.log10(n) + 1) # 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment