文章标题
来源:互联网 发布:梦里花落知多少陆叙 编辑:程序博客网 时间:2024/05/29 11:06
#include <iostream>#include <algorithm>#include <stdio.h>#include <cstring>using namespace std;int main(){ long long n; cin>>n; while(n--) {int a1; long long a,b,d,n; long long d1,l=0; cin>>a>>b>>d>>n; if(n>3) { d1=a*100+a*10+a; d1=d1*b; int dp[4],de[4]; memset(dp,0,sizeof(dp)); memset(de,0,sizeof(de)); int i=3; while(d1!=0) { dp[i]=d1%10; if(dp[i]==d) de[i]=1; d1=d1/10; i--; } i=0; if(dp[0]==0) i=1; if(de[i+1]==1) de[i+1]=n-2; cout<<de[0]+de[1]+de[2]+de[3]<<endl; int l; if(n==1) a1=a*b; if(n==2) a1=(a*10+a)*b; if(n==3) a1=(a*100+a*10+a)*b; int x=0,k; while(a1!=0) { k=a1%10; if(k==d) x++; a1=a1/10; } cout<<x<<endl; } } return 0;}
0 0
- 文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题 文章标题 文章标题 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 从程序员到项目经理(18):不要试图和下属做朋友【转载】
- Linux命令之echo,printf-2
- 腾讯云在线直播四
- Ubuntu下安装Python3.5
- 做回“安静的自已”
- 文章标题
- Qt 应用程序的部署
- 从程序员到项目经理(19):想改变任何人都是徒劳的【转载】
- 入门级算法——最大公约数 最小公倍数 快速幂 简单并查集 排列组合
- 从程序员到项目经理(20):让员工为目标而干活【转载】
- 从程序员到项目经理(21):谁都需要成就感【转载】
- Java集合
- fragment的一些记录
- 《编程之美》- 3.1 - 字符串移位包含的问题