From bc73f8b95137bca16d160b75f87c33f08c06fc9d Mon Sep 17 00:00:00 2001 From: saket13 <34890341+saket13@users.noreply.github.com> Date: Sun, 28 Oct 2018 22:01:17 +0530 Subject: [PATCH] AE00 - Rectangles Byteman has a collection of N squares with side 1. How many different rectangles can he form using these squares? Two rectangles are considered different if none of them can be rotated and moved to obtain the second one. During rectangle construction, Byteman can neither deform the squares nor put any squares upon any other ones. --- python/AE00 - Rectangles | 80 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 python/AE00 - Rectangles diff --git a/python/AE00 - Rectangles b/python/AE00 - Rectangles new file mode 100644 index 0000000..181bafa --- /dev/null +++ b/python/AE00 - Rectangles @@ -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() +