- source
import sys
import math
limit = sys.argv[2]
print(math.ceil(int(sys.argv[1]) / int(limit)))
- execution
# python3 test.py 2000 1999
2
# python3 test.py 1999 1999
1
More than 1 year has passed since last update.
import sys
import math
limit = sys.argv[2]
print(math.ceil(int(sys.argv[1]) / int(limit)))
# python3 test.py 2000 1999
2
# python3 test.py 1999 1999
1
Register as a new user and use Qiita more conveniently