Commit 6d8d5570 by BellCodeEditor

auto save

parent c20f0945
Showing with 199 additions and 0 deletions
'''
n=int(input())
a=input()
c=0
d=1
if n==len(a):
if n==1:
print(0)
if n>1:
for i in range(0,n-1):
if a[i]=="v":
if a[i+1]=="k":
c=c+1
else:
d=0
if d==0:
print(c+1)
else:
print(c)
'''
'''
n=int(input())
list_a=list(map(float,input().split()))
z=max(list_a)
x=min(list_a)
list_a.remove(z)
list_a.remove(x)
num=0
for i in list_a:
num=num+i
c=num/(n-2)
list_b=[]
for j in list_a:
q=abs(j-c)
list_b.append(q)
v=max(list_b)
print("%.2f"%c,"%.2f"%v)
a=int(input())
a=str(a)
b=[]
for i in a:
b.append(i)
if b[0] != "-" and b[-1]!="0":
b.reverse()
m=""
for i in b:
m=m+i
print(m)
elif b[0] !="-" and b[-1]=="0":
b.pop(-1)
b.reverse()
m=""
for i in b:
m=m+i
print(m)
elif b[0]=="-" and b[-1] !="0":
b.reverse()
b.pop()
b.insert(0,"-")
m=""
for i in b:
m=m+i
print(m)
elif b[0]=="-" and b[-1]=="0":
b.pop()
b.reverse()
b.pop()
b.insert(0,"-")
m=""
for i in b:
m=m+i
print(m)
m=int(input())
n=int(input())
a=m
b=n
if a>b:
r=a%b
while r!=0:
a=b
b=r
r=a%b
print(b)
elif a<=b:
a,b=b,a
r=a%b
while r!=0:
a=b
b=r
r=a%b
print(b)
if n==b and m!=b:
print(m//n)
elif n!=b and m==b:
print(m//b,"/",n//b)
elif n!=b and m!=b:
print(m//b,"/",n//b)
elif n==m:
print(1)
'''
'''
n=int(input())
he=1
sum=0
for i in range(1,n+1):
he=1
for j in range(1,i+1):
he=he*j
sum=sum+he
print(sum)
'''
'''
def v():
s=(a+b)*c
print(s)
a,b,c=map(int,input().split()) #全局变量
v()
def v():
a,b,c=map(int,input().split()) #局部变量
s=(a+b)*c
print(s)
v()
'''
'''
from turtle import *
import random
import time
n=100.0
speed("fastest")
screensize(bg='seashell')
left(90)
forward(3*n)
color("orange","yellow")
begin_fill()
left(126)
for i in range(5):
forward(n/5)
right(144)
forward(n/5)
left(72)
end_fill()
right(126)
color("dark green")
backward(n*4.8)
def tree(d,s):
if d<=0:
return
forward(s)
tree(d-1,s*0.8)
right(120)
tree(d-3,s*0.5)
right(120)
tree(d-3,s*0.5)
right(120)
backward(s)
tree(15,n)
backword(n/2)
for i in range(200):
a=200-400*random.random()
b=10-20*random.random()
up()
forward(b)
left(90)
forward(a)
down()
if random.random(0,1)==0:
color("tomato")
else:
color("wheat")
circle(2)
up()
backward(a)
right(90)
backward(b)
time.sleep(60)
'''
for xun'huan
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment