CodeForces 620B Grandfather Dovlet’s calculator
水题
#include<cstdio>
#include<cstring>
#include<cmath>
#include<stack>
#include<vector>
#include<string>
#include<iostream>
#include<algorithm>
using namespace std; int x[]; int main()
{
int a,b;
int ans=;
x[]=;
x[]=;
x[]=;
x[]=;
x[]=;
x[]=;
x[]=;
x[]=;
x[]=;
x[]=; scanf("%d%d",&a,&b);
for(int i=a;i<=b;i++)
{
int num=i;
while(num)
{
ans=ans+x[num%];
num=num/;
}
}
printf("%d\n",ans);
return ;
}
CodeForces 620B Grandfather Dovlet’s calculator的更多相关文章
- Educational Codeforces Round 6 B. Grandfather Dovlet’s calculator 暴力
B. Grandfather Dovlet’s calculator Once Max found an electronic calculator from his grandfather Do ...
- Educational Codeforces Round 6
620A - Professor GukiZ's Robot 20171122 \(ans=max(\left | x2-x1 \right |,\left | y2-y1 \right |)\ ...
- Educational Codeforces Round 6 B
B. Grandfather Dovlet’s calculator time limit per test 1 second memory limit per test 256 megabytes ...
- Educational Codeforces Round 8 B. New Skateboard 暴力
B. New Skateboard 题目连接: http://www.codeforces.com/contest/628/problem/A Description Max wants to buy ...
- python爬虫学习(5) —— 扒一下codeforces题面
上一次我们拿学校的URP做了个小小的demo.... 其实我们还可以把每个学生的证件照爬下来做成一个证件照校花校草评比 另外也可以写一个物理实验自动选课... 但是出于多种原因,,还是绕开这些敏感话题 ...
- [LeetCode] Basic Calculator II 基本计算器之二
Implement a basic calculator to evaluate a simple expression string. The expression string contains ...
- [LeetCode] Basic Calculator 基本计算器
Implement a basic calculator to evaluate a simple expression string. The expression string may conta ...
- 【Codeforces 738D】Sea Battle(贪心)
http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n g ...
- 【Codeforces 738C】Road to Cinema
http://codeforces.com/contest/738/problem/C Vasya is currently at a car rental service, and he wants ...
随机推荐
- nginx 正则表达式
1.nginx配置基础 1.正则表达式匹配 ~ 区分大小写匹配 ~* 不区分大小写匹配 !~和!~*分别为区分大小写不匹配及不区分大小写不匹配 ^ 以什么开头的匹配 $ 以什么结尾的匹配 转义字符.可 ...
- ubuntu 设置vpn
百度了资料 http://jingyan.baidu.com/article/fa4125aca7f1b628ad709271.html 1. 设置 VPN CONNECTION 2.configur ...
- offset,client,scroll,style相关笔记
1.offsetTop 功能:获取元素上外缘与最近的定位父元素内壁的距离,如果没有定位父元素,则是与文档上内壁的距离 使用方法:js document.querySelector(...).offse ...
- Object-C 自学笔记 - 1
1.基本变量类型 类型 标示符 输出格式 整形 int %i 浮点 float %f 双精度 double %g 单字符 char %c 以上是基本类型,除此之外还有long, long long i ...
- Android OpenGL ES .介绍
引自:http://blog.csdn.net/hgl868/article/details/6971624 1. OpenGL ES 简介 Android 3D引擎采用的是OpenGL ES. ...
- Opencv基础知识-----视频的读取和操作
Opencv读取视频代码 #include "stdafx.h" #include"highgui.h" int main(int argc,char* a ...
- hiho 1015 KMP
input 1<=T<=20 string1 1<=strlen(string1)<=1e4 string2 2<=strlen(string2)<=1e6 out ...
- linux视频学习6(mysql的安装/)
1.mysql的优点: 免费,跨平台,轻,支持多并发. 2.mysql的安装步骤: 把安装文件准备好,拷贝到home目录下.mount /mnt/cdrom cp mysql* /home 把安装文件 ...
- JS-DOM操作应用高级(二)
搜索 字符串比较.忽略大小写----大小写转换.模糊搜索----search的使用.split.高亮显示及筛选 toLowerCase() 方法用于把字符串转换为小写 str.search('') ...
- JSON 串 自定义解析字段
我们有时候会只需要j一个很长的json串中的少数的key value ,这个时候我们不会特意去建立一个object 来映射属性,这个时候我们可以应用 gson的JsonParser 来解析json串 ...