博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
BZOJ 1754: [Usaco2005 qua]Bull Math
阅读量:4454 次
发布时间:2019-06-07

本文共 1045 字,大约阅读时间需要 3 分钟。

Description

Bulls are so much better at math than the cows. They can multiply huge integers together and get perfectly precise answers ... or so they say. Farmer John wonders if their answers are correct. Help him check the bulls' answers. Read in two positive integers (no more than 40 digits each) and compute their product. Output it as a normal number (with no extra leading zeros). FJ asks that you do this yourself; don't use a special library function for the multiplication. 输入两个数,输出其乘积

Input

* Lines 1..2: Each line contains a single decimal number.

Output

* Line 1: The exact product of the two input lines

题解:

高精度乘法即可。

代码:

#include
#include
#include
//by zrt//problem:using namespace std;char a[105],b[105];int c[105];int la,lb;int cc;int stk[105],top;int main(){ #ifdef LOCAL freopen("in.txt","r",stdin); freopen("out.txt","w",stdout); #endif scanf("%s%s",a,b); la=strlen(a); lb=strlen(b); for(int i=0;i

转载于:https://www.cnblogs.com/zrts/p/bzoj1754.html

你可能感兴趣的文章
mac 搭建virtualenv的那些坑
查看>>
多路复用IO模型
查看>>
并发、串行、并行及多道技术原理
查看>>
hashlib、pickle、hmac、logging模块使用
查看>>
javascript常用知识点总结
查看>>
2019秋招复习笔记--数据库基本操作
查看>>
2019秋招复习笔试--手写代码
查看>>
2019秋招复习笔记--智力题
查看>>
MySQL学习笔记
查看>>
2019秋招面试复习 项目重点提问
查看>>
面试题
查看>>
DS博客作业08-课程总结
查看>>
利用Python爬虫刷店铺微博等访问量最简单有效教程
查看>>
浅谈软件测试与墨菲定律
查看>>
文件安全复制之 FastCopy
查看>>
强烈推荐美文之《从此刻起,我要》
查看>>
MYSQL中数据类型介绍
查看>>
评估软件上线标准
查看>>
敏捷开发流程
查看>>
APP兼容性测试(三)测试方案设计
查看>>