| import math | |
| n = int(input()) | |
| i=1 | |
| while i<=n: | |
| x = int(input()) | |
| d = (-1 + math.sqrt(1 + 8 * x)) / 2 | |
| print(int(d)) | |
| i = i+1 |
Subscribe to:
Post Comments (Atom)
-
def gender (sex= 'unknow' ): if sex == "m" : sex = "male" elif sex == 'f' : se...
-
import sys from PyQt4 import QtGui class Example(QtGui.QWidget): def __init__(self): super(Example,self).__init__() ...
-
Problem Explanation Problem Category : Medium Algorithm: Binary Search, Mathematical Simulation For this problem, if you know how to f...
No comments:
Post a Comment