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 ...
随机推荐
- 12.04 ubuntu 更改IP
在一个局域网里面,如果是自动获取IP,就会导致IP冲突 进入要连接的热点进行设置 IPV4 Setting address netmask ...
- 【servlet】 过滤器模板
EncodingFilter.java package Filter; import java.io.IOException; import javax.servlet.Filter; import ...
- Video Cards
Video Cards time limit per test 1 second memory limit per test 256 megabytes input standard input ou ...
- GDB: basics
Before Debugging, generating the debugging info using gcc -g3 *.c/cpp; then gdb ~.out/exe using comm ...
- 图像操作相关 With Quartz 2D
本文将为大家介绍常见的IOS图像处理操作包括以下四部分:旋转,缩放,裁剪以及像素和UIImage之间的转化,主要使用的知识是quartz2D.Quartz2D是CoreGraphics框架中的一个重要 ...
- NSAttributedString 的21种属性 详解
原文链接:http://www.jianshu.com/p/09f54730feaa 先看看所有的Key NSFontAttributeName; //字体,value是UIFont对象 NSPara ...
- UVALive 2324 Human Gene Functions(动态规划)
题意:求出将两个字符串改成一样长度所能形成最大的相似度. 思路:这个可以说是编辑距离的一个变形,编辑距离最终状态时要两个字符串完全一致,这个就是要求长度一样,而且这个只允许插入“—”这一个字符.模仿编 ...
- Android Studio没有导包快捷键怎么办
Android Studio没有导包快捷键,那怎么办呢? 在使用Eclipse开发Android应用时,开发者往往会使用Shift+Ctrl+O快捷键来快速导入所有的包,和移除未使用的包.但这个快捷键 ...
- JavaBean-- 保存 范围
1. page:当前页 2. request:一次服务器跳转范围中 3. session:一次用户操作范围,重新打开浏览器失效 4. application:整个服务器保存,服务器关闭才失效 定义一个 ...
- psy & obv
PSY和OBV 1,PSY心理线是投资者对股市涨跌产生心理波动的情绪指标.相反,当PSY曲线向下跌破PSYMA曲线后,为卖出时机..当PSY曲线向上突破PSYMA曲线后,开始向下回调至PSYMA曲线, ...