A. Roma and Lucky Numbers
来源:互联网 发布:linux c 编译器下载 编辑:程序博客网 时间:2024/05/21 06:11
解题说明:此题就是存储问题,可以转换为字符数组形式进行存储
#include<cstdio>#include<iostream>#include<cstring>#include<cmath>using namespace std;int main(){int n,k;int i,j;int length;int sum;int count,cn;char s[100][12];scanf("%d %d",&n,&k);for(i=0;i<n;i++){scanf("%s",&s[i]);}count=0;for(i=0;i<n;i++){length=strlen(s[i]);cn=0;for(j=0;j<length;j++){if(s[i][j]=='4'||s[i][j]=='7'){cn++;}}if(cn<=k){count++;}}printf("%d\n",count);return 0;}
- A. Roma and Lucky Numbers
- Codeforces Round #160 (Div. 2)---A. Roma and Lucky Numbers
- Codeforces803E Roma and Poker
- Lucky Numbers
- Lucky Numbers
- Lucky Numbers
- B. Roma and Changing Signs
- A. Mashmokh and Numbers
- A. Mashmokh and Numbers
- A. Alyona and Numbers
- Codeforces 288E Polo the Penguin and Lucky Numbers
- [bnu] 4104 Lucky numbers
- hust1600 Lucky Numbers 小水题
- F: Lucky Numbers
- UVa11970 - Lucky Numbers
- HUST 1600 Lucky Numbers
- C - Lucky Numbers
- HUST 1600 Lucky Numbers
- 黑马程序员----5集合框架
- C-DOCSIS PHS,服务组
- 内部类的访问规则
- python命名规则
- C语言要点2
- A. Roma and Lucky Numbers
- PHP安装eAccelerator
- 排序算法(笔记)
- 大败局:Google退出中国三周年祭[2P][转载]
- 在windows上如何安装部署设置SVN服务器
- Tomcat集群
- VLC 源代码结构
- sql2008 express连接字符串与sql2008 连接字符串在MFC中区别
- Windows系统环境变量大全(XP/Win7/Win8)