duduzzz

9690

aerpeisi
15922191810
jasonho
yanghua
snkz5qing
acWing_lbwnb
newczh
EQT丶

duduzzz
19天前

duduzzz
1个月前
#include<iostream>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int n,b,p;
cin>>n>>b>>p;
int total1=(2*b+1)*(n-1);
int total2=n*p;
printf("%d %d",total1,total2);
return 0;
}

duduzzz
2个月前
res=0
for i in range(5):
s=input()
if s[0]==s[2] and int(s[1])==int(s[3])-1:
res+=1
print(res)

duduzzz
2个月前
n=int(input())
res=0
for i in range(1,n):
if i*i%n*2<n:
res+=1
#print(i)
print(res)

duduzzz
2个月前
n,m=map(int,input().split())
dp=[[0]*(m+1) for _ in range(n+1)]
dp[1][1]=1
res=0
for i in range(1,n+1):
for j in range(1,m+1):
if i==1 and j==1:
continue
if i%2==0 and j%2==0:
continue
dp[i][j]=dp[i-1][j]+dp[i][j-1]
print(dp[n][m])

duduzzz
2个月前
s=input()
l=len(s)
res=''
i=0
while i<=l-1:
if i+1<l and s[i+1]<='9':
k=int(s[i+1])
while k:
k-=1
res+=s[i]
i+=1
else:
res+=s[i]
i+=1
print(res)
~

duduzzz
2个月前
n=int(input())
while n>0:
print(n,end=" ")
n//=2

duduzzz
2个月前
import sys
print(n//2520)

duduzzz
2个月前
import sys
print(n//2520)

duduzzz
2个月前
import sys
a = [0] + list(map(int, sys.stdin.readline().split()))
b = [0] + list(map(int, sys.stdin.readline().split()))
f = [[0] * (n + 10) for _ in range(n + 10)]

for i in range(1, n + 1):
maxv = 1
for j in range(1, n + 1):
f[i][j] = f[i - 1][j]
if a[i] == b[j]:
f[i][j]= max(f[i][j], maxv)
elif b[j] < a[i]:
maxv = max(maxv, f[i][j] + 1)

print(max(f[n]))