当前位置:网站首页>Contest3145 - the 37th game of 2021 freshman individual training match_ B: Password
Contest3145 - the 37th game of 2021 freshman individual training match_ B: Password
2022-07-06 09:53:00 【This question AC sleep again】

//
// " Just increase the number of digits of the password to no more than 200 It's just a bit "
// Conventional high precision
#include<bits/stdc++.h>
using namespace std;
const int MAXN=222;
char a[MAXN],b[MAXN],ans[MAXN];
void init()
{
memset( a,0,sizeof( a ) );
memset( b,0,sizeof( b ) );
memset( ans,0,sizeof( ans ) );
}
void process( char str[] )
{
char *p1=str;
char *p2=str+strlen(str)-1;
char temp;
while( p1<p2 )
{
temp=*p1; *p1=*p2; *p2=temp;
p1++; p2--;
}
for( int i=0;str[i];i++ ) str[i]-='0';
}
int main()
{
int i,pro; init();
while( ~scanf("%s%s",&a,&b) )
{
process(a); process(b);
pro=0;
for( i=0;i<MAXN-5;i++ )
{
ans[i]=( a[i]+b[i]+pro )%10;
pro=( a[i]+b[i]+pro )/10;
}
for( i=MAXN-5; ans[i]==0 && i ;i-- );
for( ;i>=0;i-- ) printf("%d",ans[i]);
printf("\n");
init();
}
return 0;
}边栏推荐
- Vh6501 Learning Series
- Listen to my advice and learn according to this embedded curriculum content and curriculum system
- May brush question 03 - sorting
- MapReduce instance (x): chainmapreduce
- 六月刷题01——数组
- 【深度学习】语义分割:论文阅读(NeurIPS 2021)MaskFormer: per-pixel classification is not all you need
- Learning SCM is of great help to society
- Automation sequences of canoe simulation functions
- June brush question 01 - array
- 一大波开源小抄来袭
猜你喜欢

嵌入式开发比单片机要难很多?谈谈单片机和嵌入式开发设计经历

Oom happened. Do you know the reason and how to solve it?
![[deep learning] semantic segmentation: paper reading: (CVPR 2022) mpvit (cnn+transformer): multipath visual transformer for dense prediction](/img/f1/6f22f00843072fa4ad83dc0ef2fad8.png)
[deep learning] semantic segmentation: paper reading: (CVPR 2022) mpvit (cnn+transformer): multipath visual transformer for dense prediction

Hero League rotation chart manual rotation

Popularization of security knowledge - twelve moves to protect mobile phones from network attacks

Segmentation sémantique de l'apprentissage profond - résumé du code source

在CANoe中通过Panel面板控制Test Module 运行(初级)

Which is the better prospect for mechanical engineer or Electrical Engineer?

PR 2021 quick start tutorial, first understanding the Premiere Pro working interface

MapReduce instance (IV): natural sorting
随机推荐
机械工程师和电气工程师方向哪个前景比较好?
C#/. Net phase VI 01C Foundation_ 01: running environment, process of creating new C program, strict case sensitivity, meaning of class library
Yarn organizational structure
【深度学习】语义分割:论文阅读:(CVPR 2022) MPViT(CNN+Transformer):用于密集预测的多路径视觉Transformer
Leetcode:608 tree node
Several ways of MySQL database optimization (pen interview must ask)
单片机实现模块化编程:思维+实例+系统教程(实用程度令人发指)
嵌入式开发中的防御性C语言编程
What are the models of data modeling
CANoe CAPL文件操作目录合集
Selection of software load balancing and hardware load balancing
Oom happened. Do you know the reason and how to solve it?
Combined search /dfs solution - leetcode daily question - number of 1020 enclaves
Mapreduce实例(六):倒排索引
Why can't TN-C use 2p circuit breaker?
[Yu Yue education] Wuhan University of science and technology securities investment reference
C杂讲 浅拷贝 与 深拷贝
Tianmu MVC audit II
CAPL 脚本打印函数 write ,writeEx ,writeLineEx ,writeToLog ,writeToLogEx ,writeDbgLevel 你真的分的清楚什么情况下用哪个吗?
018.有效的回文