POJ 3094 Quicksum 难度:0
http://poj.org/problem?id=3094
#include<iostream>
#include <string>
using namespace std;
int main()
{
string str;
getline(cin,str);
while(str != "#")
{
int ans = ;
for(int i = ;i < str.length(); i++)
{
if(str[i] == '#') return ;
if(str[i] >= 'A' && str[i] <= 'Z')
{
ans += (str[i] - 'A' + ) * (i + );
}
}
cout<<ans<<endl;
getline(cin,str);
}
return ;
}
POJ 3094 Quicksum 难度:0的更多相关文章
- [字符哈希] POJ 3094 Quicksum
Quicksum Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16488 Accepted: 11453 Descri ...
- POJ 3299 Humidex 难度:0
题目链接:http://poj.org/problem?id=3299 #include <iostream> #include <iomanip> using namespa ...
- POJ 3094 Quicksum(简单的问题)
[简要题意]:题意是非常easy. 看样能理解 [分析]:略. 读取字符串. // 200K 0Ms #include<iostream> using namespace std; int ...
- poj 3094 Quicksum
#include <stdio.h> #include <string.h> ]; int main() { ; int i,len; while(gets(word)) { ...
- POJ 3286 How many 0's?(几多0?)
POJ 3286 How many 0's?(几多0?) Time Limit: 1000MS Memory Limit: 65536K [Description] [题目描述] A Benedi ...
- POJ 1094 Sorting It All Out 拓扑排序 难度:0
http://poj.org/problem?id=1094 #include <cstdio> #include <cstring> #include <vector& ...
- POJ 2240 && ZOJ 1082 Arbitrage 最短路,c++ stl pass g++ tle 难度:0
http://poj.org/problem?id=2240 用log化乘法为加法找正圈 c++ 110ms,g++tle #include <string> #include <m ...
- POJ 1125 Stockbroker Grapevine 最短路 难度:0
http://poj.org/problem?id=1125 #include <iostream> #include <cstring> using namespace st ...
- POJ 2253 Frogger 最短路 难度:0
http://poj.org/problem?id=2253 #include <iostream> #include <queue> #include <cmath&g ...
随机推荐
- ajax实现无刷新上传附件并且显示进度条的实例
首先:得把php.ini中的post_max_size和upload_max_filesize改成200M或更大(进度条好看效果,默认是2M) html和js代码: <!DOCTYPE html ...
- Java用通配符 获得泛型的协变和逆变
Java对应泛型的协变和逆变
- ios7适配一些问题以及64位32位
ios7适配一些问题(http://www.cocoachina.com/ios/20130703/6526.html) 1.iOS应用如何实现64位的支持 http://www.codeceo.co ...
- hdu5787(数位dp)
基础的数位dp,才发现今天才终于彻底搞懂了数位dp... // // main.cpp // hdu5787.1 // // Created by New_Life on 16/8/10. // Co ...
- JavaScript数学揭密之函数与勾股定理
一.函数 function show(n){ return n*2; } alert( show(2) ); alert( show(3) ); alert( show(4) ); 二.勾股定理 1. ...
- Lucene 基础理论 (zhuan)
http://www.blogjava.net/hoojo/archive/2012/09/06/387140.html**************************************** ...
- 转!sqlServer2000 表连接查询
在查询多个表时,我们经常会用“连接查询”.连接是关系数据库模型的主要特点,也是它区别于其它类型数据库管理系统的一个标志. 什么是连接查询呢? 概念:根据两个表或多个表的列之间的关系,从这些表中查询数据 ...
- 再说TCP神奇的40ms
版权声明:本文由安斌原创文章,转载请注明出处: 文章原文链接:https://www.qcloud.com/community/article/186 来源:腾云阁 https://www.qclou ...
- mysql设置编码
1.修改数据库的编码 将数据库(test)的编码方式修改为utf8,如: ALTER DATABASE `test` DEFAULT CHARACTER SET utf8 COLLATE ut ...
- TWaver HTML5 (2D)--基本概念
基本概念 TWaver HTML5(以下简称TWaver)使用HTML5技术和javascript语言,可在支持HTML5的浏览器上进行绘图. 使用TWaver前,需熟悉几个基本概念:图元(Eleme ...