见:https://blog.csdn.net/dormousenone/article/details/75208903

 #define IOS ios_base::sync_with_stdio(0); cin.tie(0);
#include <cstdio>//sprintf islower isupper
#include <cstdlib>//malloc exit strcat itoa system("cls")
#include <iostream>//pair
#include <fstream>//freopen("C:\\Users\\13606\\Desktop\\草稿.txt","r",stdin);
#include <bitset>
//#include <map>
//#include<unordered_map>
#include <vector>
#include <stack>
#include <set>
#include <string.h>//strstr substr
#include <string>
#include <time.h>//srand(((unsigned)time(NULL))); Seed n=rand()%10 - 0~9;
#include <cmath>
#include <deque>
#include <queue>//priority_queue<int, vector<int>, greater<int> > q;//less
#include <vector>//emplace_back
//#include <math.h>
//#include <windows.h>//reverse(a,a+len);// ~ ! ~ ! floor
#include <algorithm>//sort + unique : sz=unique(b+1,b+n+1)-(b+1);+nth_element(first, nth, last, compare)
using namespace std;//next_permutation(a+1,a+1+n);//prev_permutation
#define fo(a,b,c) for(register int a=b;a<=c;++a)
#define fr(a,b,c) for(register int a=b;a>=c;--a)
#define mem(a,b) memset(a,b,sizeof(a))
#define pr printf
#define sc scanf
#define ls rt<<1
#define rs rt<<1|1
typedef long long ll;
#define rint register int;
void swapp(int &a,int &b);
double fabss(double a);
int maxx(int a,int b);
int minn(int a,int b);
int Del_bit_1(int n);
int lowbit(int n);
int abss(int a);
//const long long INF=(1LL<<60);
const double E=2.718281828;
const double PI=acos(-1.0);
const int inf=(<<);
const double ESP=1e-;
const int mod=(int)1e9+;
const int N=(int)1e6+; ll ans[];
char s[N];
ll get(int l)
{
ll sum=;
for(int i=;i<=l;++i)
sum*=,sum+=s[i]-'';
return sum;
} int main()
{
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
ans[]=;
while(~sc("%s",s+))
{
int l=strlen(s+);
if(l>)
pr("83 1111111110\n");
else
{
ll t=get(l);
for(int i=;i<=;++i)
{
if(i==||t<ans[i+])
{
pr("%d %lld\n",i,ans[i]);
break;
}
}
}
}
return ;
} /**************************************************************************************/ int maxx(int a,int b)
{
return a>b?a:b;
} void swapp(int &a,int &b)
{
a^=b^=a^=b;
} int lowbit(int n)
{
return n&(-n);
} int Del_bit_1(int n)
{
return n&(n-);
} int abss(int a)
{
return a>?a:-a;
} double fabss(double a)
{
return a>?a:-a;
} int minn(int a,int b)
{
return a<b?a:b;
}

最新文章

  1. 【java开发】数据类型
  2. [NHibernate]增删改操作
  3. 【原】SQL ROW_NUMBER() OVER
  4. ActionBarSherlock SlidingMenu整合,解决SlidingMenu example的getSupportActionBar()方法不能用问题
  5. AWK处理日志入门(转)
  6. centos彻底删除文件夹、文件命令(centos 新建、删除、移动、复制等命令)
  7. C:常量、变量 、 表达式 、运算符、 枚举
  8. iOS 网络/本地 图片 按自定义比例缩放 不失真 方法
  9. tcp/ip协议listen函数中backlog參数的含义
  10. erlang程序优化点的总结(持续更新)
  11. 【java】泛型的作用是在编译阶段防止错误输入,绕过编译就绕过泛型,可用反射验证
  12. 【转】python入门指引
  13. js作用域的相关知识
  14. SharePoint 2013 新建网站集图解(绝对菜鸟篇)
  15. myBatis之入门示例
  16. PAT1129:Recommendation System
  17. Maven(二)名词、命令、仓库、依赖、私服
  18. [Swift]LeetCode272. 最近的二分搜索树的值 II $ Closest Binary Search Tree Value II
  19. 剑指Offer 46. 孩子们的游戏(圆圈中最后剩下的数) (其他)
  20. 用python语言算π值并且带有进度条

热门文章

  1. 如何知道,当前redis实例是处于阻塞状态?
  2. iOS学习之Autolayout
  3. 【sed】基本用法
  4. 2018-2019-2 20165330《网络对抗技术》Exp9 Web安全基础
  5. XGBoost原理简介
  6. ubuntu php
  7. shell 基数数值方法
  8. 前端知识点回顾之重点篇——CORS
  9. Handler注意事项
  10. Node安装配置