xxxxxxxxxx
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/spot/orders'
query_param = ''
body='{"text":"t-123456","currency_pair":"ETH_BTC","type":"limit","account":"spot","side":"buy","iceberg":"0","amount":"1","price":"5.00032","time_in_force":"gtc","auto_borrow":false}'
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('POST', prefix + url, query_param, body)
headers.update(sign_headers)
r = requests.request('POST', host + prefix + url, headers=headers, data=body)
print(r.json())
xxxxxxxxxx
Def primeFactors(n)
While n%2 ==0
Print 2
N=n/2
For i in range (3, int(math.sqrt(n))+1,2)
While n%i == 0
Print i
N=n/i
If n>2
Print n
xxxxxxxxxx
Def primeFactors(n)
While n%2 ==0
Print 2
N=n/2
For i in range (3, int(math.sqrt(n))+1,2)
While n%i == 0
Print i
N=n/i
If n>2
Print n
xxxxxxxxxx
def f(n):
if n <= 1:
return 0
if n > 1 and n % 2 != 0:
return f(n-1) + 3*n**2
if n > 1 and n % 2 == 0:
return n/2 + f(n-1) + 2
print(f(49))
xxxxxxxxxx
def f(n):
if n <= 1:
return 0
if n > 1 and n % 2 != 0:
return f(n-1) + 3*n**2
if n > 1 and n % 2 == 0:
return n/2 + f(n-1) + 2
print(f(49))
xxxxxxxxxx
function verif(x:string;n:integer;t:tab1):boolean;
var j:integer;
test:boolean;
begin
j:=0;
repeat
j:=j+1;
test:=t[j]<>x;
until (test=false)or(j=n);
verif:=test;
end;
xxxxxxxxxx
def billboard (ListOfBillboard, n):
maxArea=0
for i in range (1,n-1) :
minimumLeftside= 1000 # getting the minimum values on left without the value on the current panel
minimumRightside= 1000 # getting the minimum values on right side including the current panel
leftCount =i
rightCount = n- i
for j in range (0,i): #going through the left panels
if (ListOfBillboard[j]<minimumLeftside) : #to find the smallest value left of the current panel
minimumLeftside=ListOfBillboard[j]
for j in range (i,n) :
if (List[j]<minimumRightside):
minimumRightside=List[j]
totalArea = (minimumLeftside+leftCount) + (minimumRightside*rightCount)
if (maxArea<totalArea) :
maxArea = totalArea
print(maxArea)
n =int (input ())
List =list (map (int, input (). split ()))
billboard (List, n)
xxxxxxxxxx
import sys
inp = []
for line in sys.stdin:
l = list(map(int,line.strip().split()))
inp.append(l)
# print(inp)
d,n = inp[0][0],inp[0][1]
maxTym=0