220 DIV2 B. Inna and Nine
2024-08-26 20:18:34
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 ;
}
最新文章
- XE7 &; IOS开发之开发账号(3):证书、AppID、设备、授权profile的申请使用,附Debug真机调试、Ad hoc下iPA文件生成演示(XCode5或以上版本推荐,有图有真相)
- store 加载异常处理与加载信息提示
- 表单 - Form - EasyUI提供的表单异步提交
- ABAP Performance Examples
- iOS FMDB官方使用文档 G-C-D的使用 提高性能(翻译)(转)
- NeHe OpenGL教程 第九课:移动图像
- 使用android.support.design.widget.TabLayout出现java.lang.reflect.InvocationTargetException
- 一个基于node 的小demo
- C语言 一维数组叠加为二维数组样例
- Creator仿超级玛丽小游戏源码分享
- django上下文处理器
- html 之 position 绝对定位与相对定位(待补充)
- Java连接SqlServer 2008数据库
- Tensorflow动态seq2seq使用总结(r1.3)
- 8b10b
- Bootstrap框架(一)
- 南昌邀请赛网络赛 D.Match Stick Game(dp)
- 启动JAR Hadoop任务
- 开源IDS系列--snorby 2.6.2 undefined method `run_daily_report&#39; for Event:Class (NoMethodError)
- 重命名文件或文件夹(mv命令与rename命令)