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的更多相关文章

  1. 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) ...

  2. codeforces round #234B(DIV2) C Inna and Huge Candy Matrix

    #include <iostream> #include <vector> #include <algorithm> #include <utility> ...

  3. codeforces round #234B(DIV2) A Inna and Choose Options

    #include <iostream> #include <string> #include <vector> using namespace std; ; ,,, ...

  4. codeforces round #234B(DIV2) B Inna and New Matrix of Candies

    #include <iostream> #include <vector> #include <string> #include <algorithm> ...

  5. Codeforce Round #220 Div2

    这场气场太大,居然一个题不会! 所以没交! 赛后发现 A:陷阱多- -!不要超过上下界,可以上去再下来! B:不会做! C:自己想太多- -!

  6. Codeforce 220 div2

    D 插入: 在当前指针位置sz处插入一个1,col[sz]记录插入的内容,sz++; 删除i: 找到第i个1的位置,赋为0; 于是转化为一个维护区间和的问题; trick: 如果是依次删除a[0],a ...

  7. CodeForces比赛总结表

    Codeforces A                     B                        C                             D            ...

  8. codeforces div2 220 解题

    这套题我只写了a, b, c..  对不起,是我太菜了. A:思路:就是直接简化为一个矩阵按照特定的步骤从一个顶角走到与之对应的对角线上的顶角.如图所示. 解释一下特定的步骤,就像马走日,象走田一样. ...

  9. Codeforces Round #220 (Div. 2) D - Inna and Sequence

    D - Inna and Sequence 线段数维护区间有几个没有被删除的数,利用线段树的二分找第几个数在哪里,然后模拟更新就好啦. #include<bits/stdc++.h> #d ...

随机推荐

  1. 安装apk文件报waiting for device 时解决办法

    C:\Users\root>adb install d:\rry_0514.apkerror: more than one device and emulator- waiting for de ...

  2. JQuery之proxy实现绑定代理

    在javascript中,this指代的对象时常会变化,这会造成程序,混乱,一般做法就是先将this保存在一个变量中,就不怕她变了,我们先看一个小例子 var A = function(){ this ...

  3. Func 委托

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  4. WPF 绑定三(绑定List中指定的字符串)

    xaml: <Window x:Class="WpfApplication1.Window3" xmlns="http://schemas.microsoft.co ...

  5. LINQ技巧:如何通过多次调用GroupBy实现分组嵌套

    问题如上,解决如下,目标在最下面:结果: using System; using System.Linq; using System.Collections.Generic; namespace Co ...

  6. Vim复制粘贴

    用了快一年Vim了,今天想要将vim里的一句话复制到浏览器里,结果捣鼓了半天.汗! 解决方案: 在vim中按“V”进入可视模式,选中要复制的文字 接下来要按3个键“+y(引号.加号.字母y),这样要复 ...

  7. extjs的combobox的用法

    可以用javascript的数组作为数据源,也可以用json作为数据源: 1.用javascript数组 var CountryCode = [ ['93','Afghanistan(93)'], [ ...

  8. 用Redis bitmap统计活跃用户、留存

    Spool的开发者博客,描述了Spool利用Redis的bitmaps相关的操作,进行网站活跃用户统计工作. 原文:http://blog.getspool.com/2011/11/29/fast-e ...

  9. 幻灯slider

    <style> .focusBox { position: relative; width: 340px; height: 240px; overflow: hidden; font: 1 ...

  10. iOS 进阶 第十一天(0411)

    0411 UItaBbar的结构 每一个数组都有一个方法,那就是下面这个,如下图所示: 如果想看系统控件是怎么构成的,那么就采用遍历其子控件的方式来做,如上一图中所示 在iOS7及其以后的系统里,控制 ...