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. ▲教你如何轻易的做linux计划任务▲——小菜一碟

    一次性计划任务的安排: at :安排作业在某一时刻执行一次(一般都是用它) batch:安排作业在系统负载不重时执行一次 第一步: #service atd start  开启一次性计划任务   at ...

  2. 如何在java类中读取Properties配置文件

    在com.example包下有一个test.properties文件和测试类PropertyReadTest.java. test.properties 文件内容: author=zeige  tea ...

  3. js实现雪花飘落效果的代码

    使用js实现雪花飘落的效果,用html5绘布加js写的雪花飘效果 . 代码: <html> <head> <script> /** * js与html5实现的雪花飘 ...

  4. js各类共用方法

    function GetParameterValueByName(parametername) { var reg = new RegExp("(^|&)" + param ...

  5. openerp经典收藏 OpenERP库存管理的若干概念讲解(新增库存价值)(转载)

    OpenERP库存管理的若干概念讲解(新增库存价值) 原文:http://shine-it.net/index.php/topic,2425.0/topicseen.html 一.复式库存(Doubl ...

  6. 使用文件监控对象FileSystemWatcher实现数据同步

    最近在项目中有这么个需求,就是得去实时获取某个在无规律改变的文本文件中的内容.首先想到的是用程序定期去访问这个文件,因为对实时性要求很高,间隔不能超过1S,而且每次获取到文本内容都要去分发给WEB服务 ...

  7. Zend-MVC事件

    Zend\Mvc\MvcEvent继承自Zend\EventManager\Event,在Zend\Mvc\Application::bootstrap()执行时触发.如果你的控制器实现了Zend\M ...

  8. eclipse安装pydev插件

    打开Eclipse,找到Help菜单栏,进入Install New Software…选项. 点击work with:输入框的旁边点击Add…,Name可以随便输入,Location是http://p ...

  9. vs2010旗舰版后,运行调试一个项目时调试不了,提示的是:无法使用“pc”附加到应用程序“webdev.webserver40.exe(PID:2260”

    具体问题描述: vs2010旗舰版后,运行调试一个项目时调试不了,能编译,按ctrl+f5 可以运行,但是就是调试就不行,提示的是:无法使用“pc”附加到应用程序“webdev.webserver40 ...

  10. google api , the problem of null refresh token

    http://stackoverflow.com/questions/10827920/google-oauth-refresh-token-is-not-being-received The ref ...