print() is a function just like every other function (#1101)

* print() is a function just like every other function
This commit is contained in:
Christian Clauss
2019-08-06 12:14:23 +02:00
committed by Harshil
parent 6654e1ec7d
commit 89acf5d017
13 changed files with 133 additions and 133 deletions

View File

@ -16,14 +16,14 @@ class FenwickTree:
ret += self.ft[i]
i -= i & (-i)
return ret
if __name__ == '__main__':
f = FenwickTree(100)
f.update(1,20)
f.update(4,4)
print (f.query(1))
print (f.query(3))
print (f.query(4))
print(f.query(1))
print(f.query(3))
print(f.query(4))
f.update(2,-5)
print (f.query(1))
print (f.query(3))
print(f.query(1))
print(f.query(3))