220 DIV2 B. Inna and Nine
220 DIV2 B. Inna and Nine
input
369727
output
2
input
123456789987654321
output
1
题意:比如例子1:369727-->99727-->9997 , 369727-->99727-->9979
14545181例子2:14545181-->1945181-->194519-->19919,
14545181-->1945181-->199181-->19991
但是:14545181-->149591这是错的
注意:使用__int64
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <iostream>
#define M 100005
char s[M]; int main()
{
//freopen("in.txt","r",stdin);
while(~scanf("%s",s))
{
int i,n;
n=strlen(s);
__int64 ans=;
for(i=;i<n;i++)
{
if(s[i]-''+s[i+]-''== && i+<n)
{
__int64 c=;
while(s[i]-''+s[i+]-''==)
{
c++;
i++;
}
if(c%==)
ans*=;
else
ans*=(c/+);
}
}
printf("%I64d\n",ans);
}
return ;
}
220 DIV2 B. Inna and Nine的更多相关文章
- 220 DIV2 A. Inna and Pink Pony
Inna and Pink Pony 输入n,m,i,j,a,b 可以看成n行m列的矩阵,起点(i,j),每次移动(a,b),(-a,-b),(-a,b),(a,-b) 可移动到(1,m),(n,1) ...
- codeforces round #234B(DIV2) C Inna and Huge Candy Matrix
#include <iostream> #include <vector> #include <algorithm> #include <utility> ...
- codeforces round #234B(DIV2) A Inna and Choose Options
#include <iostream> #include <string> #include <vector> using namespace std; ; ,,, ...
- codeforces round #234B(DIV2) B Inna and New Matrix of Candies
#include <iostream> #include <vector> #include <string> #include <algorithm> ...
- Codeforce Round #220 Div2
这场气场太大,居然一个题不会! 所以没交! 赛后发现 A:陷阱多- -!不要超过上下界,可以上去再下来! B:不会做! C:自己想太多- -!
- Codeforce 220 div2
D 插入: 在当前指针位置sz处插入一个1,col[sz]记录插入的内容,sz++; 删除i: 找到第i个1的位置,赋为0; 于是转化为一个维护区间和的问题; trick: 如果是依次删除a[0],a ...
- CodeForces比赛总结表
Codeforces A B C D ...
- codeforces div2 220 解题
这套题我只写了a, b, c.. 对不起,是我太菜了. A:思路:就是直接简化为一个矩阵按照特定的步骤从一个顶角走到与之对应的对角线上的顶角.如图所示. 解释一下特定的步骤,就像马走日,象走田一样. ...
- Codeforces Round #220 (Div. 2) D - Inna and Sequence
D - Inna and Sequence 线段数维护区间有几个没有被删除的数,利用线段树的二分找第几个数在哪里,然后模拟更新就好啦. #include<bits/stdc++.h> #d ...
随机推荐
- 《iptables详解 》RHEL6
iptables详解 Iptables原理 现在防火墙主要分以下三种类型:包过滤.应用代理.状态检测 包过滤防火墙:现在静态包过滤防火墙市面上已经看不到了,取而代之的是动态包过滤技术 ...
- 为一个有数据没有主键id的数据表添加主键字段
ALTER TABLE `photo_feedbacks` ADD COLUMN `id` int(11) NOT NULL AUTO_INCREMENT FIRST ,ADD PRIMARY KE ...
- 基于ArcGIS API for JavaScript的统计图表实现
感谢原作者分享:https://github.com/shevchenhe/ChartLayer,在使用的过程中,需要自己进行调试修改,主要还是_draw函数,不同的ArcGIS JS API函数有差 ...
- eclipse 4 rcp: java.lang.RuntimeException: No application id has been found.
错误详情: java.lang.RuntimeException: No application id has been found. at org.eclipse.equinox.internal. ...
- ajax 设置Access-Control-Allow-Origin实现跨域访问
ajax跨域访问是一个老问题了,解决方法很多,比较常用的是JSONP方法,JSONP方法是一种非官方方法,而且这种方法只支持GET方式,不如POST方式安全. 即使使用jquery的jsonp方法,t ...
- C# new的用法
在 C# 中,new 关键字可用作运算符.修饰符或约束. 1)new 运算符:用于创建对象和调用构造函数.这种大家都比较熟悉,没什么好说的了. 2)new 修饰符:在用作修饰符时,new 关键字可以显 ...
- mysql-5.5.46源码编译安装
1.安装准备 cat /etc/redhat-release uname -r yum install ncurses-devel cmake automake autoconf make gcc g ...
- selenium+python find_element_by_css_selector方法使用
1.通过类class获取 比如如下代码 <h1 class="important"> This heading is very important. </h1&g ...
- 《零成本实现Web自动化测试--基于Selenium》第一章 自动化测试基础
第一篇 Selenium 和WebDriver工具篇 第一章 自动化测试基础 1.1 初识自动化测试 自动化测试有两种常见方式 1.1.1 代码驱动测试,又叫测试驱动开发(TDD) 1.1.2 ...
- cadence原理图绘制方法
仅记录了绘制好原理图后的一些处理: 1 重写编写元件编号 1)Tool -> Annotate 在Packing选项卡中 的Action 选中 Reset part references ...