forked from haritha1313/spojprobs
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from saket13/patch-4
AE00 - Rectangles
- Loading branch information
Showing
1 changed file
with
80 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#from __future__ import division | ||
import math | ||
#import os | ||
#import random | ||
#import re | ||
#from sys import stdin, stdout | ||
#from collections import Counter,deque,OrderedDict,defaultdict | ||
#from itertools import permutations,product,combinations | ||
#from heapq import heapify,heappush,heappop,heappushpop,heapify,heapreplace,nlargest,nsmallest | ||
#import numpy as np | ||
from operator import mul | ||
|
||
|
||
MOD=10**9+7 | ||
INF=float('+inf') | ||
|
||
|
||
def si(): | ||
return str(stdin.readline()) | ||
def ii(): | ||
return int(raw_input()) | ||
def mi(): | ||
return map(int, raw_input().split()) | ||
def li(): | ||
return [int(i) for i in raw_input().split()] | ||
def debug(x): | ||
return stdout.write(str(x)) | ||
def limul(list): | ||
return eval('*'.join(str(item) for item in list)) | ||
|
||
|
||
"-----------------------------------------------" | ||
|
||
|
||
def main(): | ||
t=ii() | ||
nor=0 | ||
for i in range(1,t+1): | ||
nor+=nof(i) | ||
print(nor) | ||
|
||
def nof(n): | ||
nf=1 | ||
sr=int(math.sqrt(n)) | ||
for i in range(2,sr+1): | ||
if n%i==0: | ||
nf+=1 | ||
return nf | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
main() | ||
|