当前位置:网站首页>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;
}边栏推荐
- Leetcode:608 tree node
- 51单片机进修的一些感悟
- 大学C语言入门到底怎么学才可以走捷径
- [untitled]
- I2C summary (single host and multi host)
- Une grande vague d'attaques à la source ouverte
- 为什么大学单片机课上51+汇编,为什么不直接来STM32
- Regular expressions are actually very simple
- 【深度学习】语义分割:论文阅读:(CVPR 2022) MPViT(CNN+Transformer):用于密集预测的多路径视觉Transformer
- Mapreduce实例(六):倒排索引
猜你喜欢

Solve the problem of too many small files

Learning SCM is of great help to society

C杂讲 文件 初讲

Hero League rotation map automatic rotation
![[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

Segmentation sémantique de l'apprentissage profond - résumé du code source
![[deep learning] semantic segmentation: thesis reading (neurips 2021) maskformer: per pixel classification is not all you need](/img/84/cfcd006d445fc54ea0eda3f92e7d9d.jpg)
[deep learning] semantic segmentation: thesis reading (neurips 2021) maskformer: per pixel classification is not all you need

Download address of canoe, download and activation of can demo 16, and appendix of all canoe software versions

Which is the better prospect for mechanical engineer or Electrical Engineer?
![[CV] target detection: derivation of common terms and map evaluation indicators](/img/e8/04cc8336223c0ab2dea5638def88df.jpg)
[CV] target detection: derivation of common terms and map evaluation indicators
随机推荐
Listen to my advice and learn according to this embedded curriculum content and curriculum system
六月刷题01——数组
Libuv thread
Learning SCM is of great help to society
Use of activiti7 workflow
max-flow min-cut
Yarn organizational structure
Compress decompress
Canoe cannot automatically identify serial port number? Then encapsulate a DLL so that it must work
Leetcode:608 树节点
【深度學習】語義分割-源代碼匯總
Mapreduce实例(四):自然排序
C杂讲 浅拷贝 与 深拷贝
Some thoughts on the study of 51 single chip microcomputer
CAPL script pair High level operation of INI configuration file
学习单片机对社会的帮助是很大的
Solve the problem of too many small files
嵌入式中的合作开发--函数指针
Random notes
May brush question 03 - sorting