#include <iostream>
#include <string> using namespace std; int main(){
int n;
cin >> n;
string str;
cin >> str;
long long cnt = , x = ;
for(int i = ; i < n ; ++ i){
if(str[i] == 'B') cnt+=(x << i);
}
cout<<cnt<<endl;
}
 
Codeforces Round #233 (Div. 2)

Codeforces Round #233 (Div. 2) B. Red and Blue Balls的更多相关文章

  1. Codeforces Round #233 (Div. 2) A、Pages

    #include <iostream> using namespace std; int main(){ int n,p,k; cin >> n >> p > ...

  2. Codeforces Round #233 (Div. 2)D. Painting The Wall 概率DP

                                                                                   D. Painting The Wall ...

  3. Codeforces Round #309 (Div. 2) C. Kyoya and Colored Balls 排列组合

    C. Kyoya and Colored Balls Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contes ...

  4. Codeforces Round #309 (Div. 2) C. Kyoya and Colored Balls

    Kyoya Ootori has a bag with n colored balls that are colored with k different colors. The colors are ...

  5. Codeforces Round #446 (Div. 2)

    Codeforces Round #446 (Div. 2) 总体:rating涨了好多,虽然有部分是靠和一些大佬(例如redbag和ShichengXiao)交流的--希望下次能自己做出来2333 ...

  6. Codeforces Round #485 (Div. 2)

    Codeforces Round #485 (Div. 2) https://codeforces.com/contest/987 A #include<bits/stdc++.h> us ...

  7. Codeforces Round #485 (Div. 2) A. Infinity Gauntlet

    Codeforces Round #485 (Div. 2) A. Infinity Gauntlet 题目连接: http://codeforces.com/contest/987/problem/ ...

  8. Codeforces Round #545 (Div. 1) 简要题解

    这里没有翻译 Codeforces Round #545 (Div. 1) T1 对于每行每列分别离散化,求出大于这个位置的数字的个数即可. # include <bits/stdc++.h&g ...

  9. Codeforces Round 536 (Div. 2) (E)

    layout: post title: Codeforces Round 536 (Div. 2) author: "luowentaoaa" catalog: true tags ...

随机推荐

  1. Python 的三目运算

    其他语言:php 判定条件?为真时的结果:为假时的结果 $a=88 $b=99 $res = $a>$b?$a>$b 搞笑的Python:令人意想不到的语法形式 true_value if ...

  2. Jquery自定义图片上传插件

    1 概述 编写后台网站程序大多数用到文件上传,可是传统的文件上传控件不是外观不够优雅,就是性能不太好看,翻阅众多文件上传控件的文章,发现可以这样去定义一个文件上传控件,实现的文件上传的效果图如下: 2 ...

  3. Fallout4 Creation Kit

    按住SHIFT是旋转视角,按住鼠标中键 E是移动物品 双击W是旋转物品 数字键2 是调整物品大小

  4. c++ 的 static_cast

    http://www.cnblogs.com/pigerhan/archive/2013/02/26/2933590.html #include "Person.h" #inclu ...

  5. 攻城狮在路上(壹) Hibernate(一)--- 软件环境、参考书目等一览表

    1.环境配置: web容器:tomcat6.0 JDK:1.7.0_51 hibernate:4.2.0.Final 操作系统:WIN8 64位 数据库:mysql  Ver 14.12 Distri ...

  6. JavaScript - Html 中使用JavaScript

    把JavaScript插入到HTML页面要使用<script>元素.使用这个元素可以把JavaScript嵌入到HTML页面中,让脚本与标记混合在一起:也可以包含外部的JavaScript ...

  7. android开子线程避免出现main错误

    Runnable SonThread=new Runnable() { @Override public void run() { // TODO Auto-generated method stub ...

  8. 跟着鸟哥学Linux系列笔记0-如何解决问题

    跟着鸟哥学Linux系列笔记0-扫盲之概念 在发生问题怎么处理: 1.  在自己的主机.网络数据库上查询How-To或FAQ -Linux 自身的文件数据: /usr/share/doc -CLDP中 ...

  9. poj 3895(求无向图的最大简单环)

    题目链接:http://poj.org/problem?id=3895 思想很简单,就是dfs,并且用一个数组记录到该节点所走过的长度,然后如果遇到已经走过的,就说明存在环了, 更新一下ans. /* ...

  10. WebView中实现文件下载功能

      WebView控制调用相应的WEB页面进行展示.当碰到页面有下载链接的时候,点击上去是一点反应都没有的.原来是因为WebView默认没有开启文件下载的功能,如果要实现文件下载的功能,需要设置Web ...