Skip to content

Instantly share code, notes, and snippets.

View Svastikkka's full-sized avatar
🏛️
Working from Gift City

Manshu Sharma Svastikkka

🏛️
Working from Gift City
View GitHub Profile
class Node:
def __init__(self,data):
self.data=data
self.next=None
def LinkedList(arr):
head=None
tail=None
if len(arr)<1:
return None
def hornerRule(poly,n,x):
result=poly[0]
for i in range(1,n):
result=result*x+poly[i]
return result
arr=list(map(int,input().split))
x=int(input())
len=len(arr)
print(hornerRule(arr,len,x))
## Read input as specified in the question.
## Print output as specified in the question.
class Node:
def __init__(self,data):
self.data=data
self.next=None
def LinkedLists(arr):
head=None
tail=None
p=int(input())
q=int(input())
print((p*q)/(p+q))
p,q=map(int,input().split())
print(p**q)
p=int(input())
q=int(input())
print(p/q)
print("Hello CodeRams")
import math
t=int(input())
res=0
for i in range(t):
p=int(input())
q=int(input())
res=res+abs((p-q)**2)
print(math.sqrt(res))
h=int(input())
m=int(input())
s=int(input())
a=input()
if a=="AM":
print(3600*h+m*60+s)
else:
print(3600*(h+12)+m*60+s)
import math
x1=int(input())
y1=int(input())
x2=int(input())
y2=int(input())
print(math.sqrt((x2-x1)**2+(y2-y1)**2))