保密员(baomi)
2024-10-16 22:21:13
#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 ;
}
最新文章
- [笔记]linux用户与用户组
- uploadify v3.2.1 上传报大量js 类似__flash__addCallback(document.getElementById(";SWFUpload_0";), ";ReturnUploadStart";); 错误
- 寒冰王座 hdu 1248(背包)
- wk_02
- git by example
- 从零学习storm(一) 环境的安装配置
- (Protype Pattern)原型模式
- jsoncpp用法通俗易懂之解析
- 应用之星推出“图文app”制作工具,并附上教程
- 矩阵(快速幂):COGS 963. [NOI2012] 随机数生成器
- 基于GBT28181:SIP协议组件开发-----------第二篇SIP组件开发原理
- 在线编辑器kindEditor
- perl 面向对象 new方法
- 动态链接库dll的 静态加载 与 动态加载
- C++ 堆 和 堆 分析
- Webdriver API之操作(二)
- C语言switch/case圈复杂度优化重构
- Java基础中的一些概念理解
- 基于URL的高层次Java网络编程
- scapy学习笔记(5)
热门文章
- 分享一段ios数据库代码,包括对表的创建、升级、增删查改
- C#编程(六十九)----------DLR简介
- 【MySQL】EXPLAIN命令详解
- WordPress主题开发:实现分页功能
- rtsp实现的开源代码
- CUDA报错: Cannot create Cublas handle. Cublas won&#39;t be available. 以及:Check failed: status == CUBLAS_STATUS_SUCCESS (1 vs. 0) CUBLAS_STATUS_NOT_INITIALIZED
- UEFI与 Legacy BIOS两种启动模式详解
- perf 高级命令简介
- 【ContestHunter】【弱省胡策】【Round6】
- springMVC4(14)各类视图输出实例分析