#include<iostream>
#include<string>
#include<stdio.h>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include <math.h> using namespace std;
int a;
char b[];
float s;
int main(){
scanf("%d %s",&a,b);
//printf("%s\n",b);
int len = strlen(b);
s= ;
for(int i = ; i < len ; i++)
{
int t = ;
if(b[i] >= 'A')
t = b[i] -'A' + ;
else
t = b[i] - ''; s += pow(a,-i+) * t;
}
s *= ;
s = floor(s + 0.5);
s /= ;
printf("%0.4f\n",s);
//printf("%s\n",a);
return ;
}

最新文章

  1. [笔记]linux用户与用户组
  2. uploadify v3.2.1 上传报大量js 类似__flash__addCallback(document.getElementById(&quot;SWFUpload_0&quot;), &quot;ReturnUploadStart&quot;); 错误
  3. 寒冰王座 hdu 1248(背包)
  4. wk_02
  5. git by example
  6. 从零学习storm(一) 环境的安装配置
  7. (Protype Pattern)原型模式
  8. jsoncpp用法通俗易懂之解析
  9. 应用之星推出“图文app”制作工具,并附上教程
  10. 矩阵(快速幂):COGS 963. [NOI2012] 随机数生成器
  11. 基于GBT28181:SIP协议组件开发-----------第二篇SIP组件开发原理
  12. 在线编辑器kindEditor
  13. perl 面向对象 new方法
  14. 动态链接库dll的 静态加载 与 动态加载
  15. C++ 堆 和 堆 分析
  16. Webdriver API之操作(二)
  17. C语言switch/case圈复杂度优化重构
  18. Java基础中的一些概念理解
  19. 基于URL的高层次Java网络编程
  20. scapy学习笔记(5)

热门文章

  1. 分享一段ios数据库代码,包括对表的创建、升级、增删查改
  2. C#编程(六十九)----------DLR简介
  3. 【MySQL】EXPLAIN命令详解
  4. WordPress主题开发:实现分页功能
  5. rtsp实现的开源代码
  6. CUDA报错: Cannot create Cublas handle. Cublas won&#39;t be available. 以及:Check failed: status == CUBLAS_STATUS_SUCCESS (1 vs. 0) CUBLAS_STATUS_NOT_INITIALIZED
  7. UEFI与 Legacy BIOS两种启动模式详解
  8. perf 高级命令简介
  9. 【ContestHunter】【弱省胡策】【Round6】
  10. springMVC4(14)各类视图输出实例分析