爱奇艺编程题
求贴个方块涂色代码
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll computer(ll n){
ll temp=n;
ll count=0;
if(temp<101){
temp=(n/10)%10;
count=temp-1;
if(n%10>=temp)
count++;
}
//cout<<count<<endl;
return count;
}
ll qiyi(ll n){
return computer(n%100)+10*(n/100);
}
int main() {
ll L,R;
while(cin>>L>>R){
cout<<(qiyi(R)-qiyi(L-1))<<endl;
}
return 0;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007
int a[55];
int main() {
int n;
while(cin>>n){
for(int i=0;i<n;i++)
cin>>a[i];
sort(a,a+n);
ll res=1;
for(int i=0;i<n;i++){
res=(res*a[i])%mod;
for(int j=i+1;j<n;j++)
a[j]--;
}
cout<<res<<endl;
}
return 0;
}