牛客网PAT练兵场-部分A+B
题解:简单循环
题目地址:https://www.nowcoder.com/questionTerminal/fb581ea099a14f5d97c6149cbeee249f
/**
*
*作者:Ycute
*时间:2019-11-01-15.13.53
*题目简单描述:简单循环取出相应的数即可
*/ #include<iostream>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<vector>
using namespace std; int main(){
int A,a1,B,b1;
scanf("%d %d %d %d",&A,&a1,&B,&b1);
int temp1=,temp2=;
while(A){
int t;
t=A%;
A/=;
if(t==a1){
temp1=temp1*+a1;
}
}
while(B){
int t;
t=B%;
B/=;
if(t==b1){
temp2=temp2*+b1;
}
}
printf("%d\n",temp1+temp2);
return ;
}
牛客网PAT练兵场-部分A+B的更多相关文章
- 牛客网PAT练兵场-科学计数法
题目地址:https://www.nowcoder.com/pat/6/problem/4050 题解:模拟题 /** * Copyright(c) * All rights reserved. * ...
- 牛客网PAT练兵场-旧键盘打字
题目地址:https://www.nowcoder.com/pat/6/problem/4059 题解:用数组下标标记,直接模拟 /** * *作者:Ycute *时间:2019-12-01-21.3 ...
- 牛客网PAT练兵场-人口普查
题目地址:https://www.nowcoder.com/pat/6/problem/4054 题解:结构体排序即可 /** * Copyright(c) * All rights reserved ...
- 牛客网PAT练兵场-完美数列
题目地址:https://www.nowcoder.com/pat/6/problem/4056 题解:先将a数组进行排序,第一次按题意M<=n*p;n=a[0]时,M最大为J(如下图),然后n ...
- 牛客网PAT练兵场-打印沙漏
题目地址:https://www.nowcoder.com/pat/6/problem/4053 题意:模拟题 /** * Copyright(c) * All rights reserved. * ...
- 牛客网PAT练兵场-在霍格沃茨找零钱
题目地址:https://www.nowcoder.com/pat/6/problem/4063 题意:按照题目的进制计算即可 /** * *作者:Ycute *时间:2019-11-14-21.45 ...
- 牛客网PAT练兵场-福尔摩斯的约会
题目地址:https://www.nowcoder.com/pat/6/problem/4040 题意:模拟题,循环找相同的字母,但是注意题目的坑 /** * *作者:Ycute *时间:2019-1 ...
- 牛客网PAT练兵场-A除B
题目地址:https://www.nowcoder.com/pat/6/problem/4043 题解:遍历大数,边除边输出,最后得到余数输出即可 /** * *作者:Ycute *时间:2019-1 ...
- 牛客网PAT练兵场-锤子剪刀布
题目地址:https://www.nowcoder.com/questionTerminal/79db907555c24b15a9c73f7f7d0e2471 题解:无 /** * *作者:Ycute ...
- 牛客网PAT练兵场-跟奥巴马一起编程
题目地址: 题意:无 /** * *作者:Ycute *时间:2019-11-14-21.29.07 *题目题意简单描述:模拟题输出 */ #include<iostream> #incl ...
随机推荐
- jupyter的服务器配置安装
该教程主要针对的是服务器安装,且在后台保持稳定运行的情况. 1.jupyter下载 有网的时候 1. pip install jupyter 离线安装 在有网络的环境下载安装包 2. pip down ...
- PHP 函数实例讲解
PHP 函数 PHP 的真正威力源自于它的函数. 在 PHP 中,提供了超过 1000 个内建的函数. PHP 内建函数 如需查看所有数组函数的完整参考手册和实例,请访问我们的 PHP 参考手册. P ...
- Android 的Glide、TabLayout、RecyclerView(下一章补充)。
今天的内容主要和一些依赖有关, //Glide依赖implementation 'com.github.bumptech.glide:glide:4.11.0'//Google Design依赖//n ...
- ExtremeNet
- 卷积神经网络 part2
[任务一]代码练习 在谷歌 Colab 上完成代码练习,关键步骤截图,并附一些自己的想法和解读. ● MobileNetV1 网络:简要阅读谷歌2017年的论文<MobileNets: Eff ...
- java 启动Tomcat报错:The specified JRE installation does not exist
启动TomCat服务报错: The specified JRE installation does not exist 解决方法: Eclipse:window->perferences-> ...
- Who Am I? Personality Detection based on Deep Learning for Texts 阅读笔记
文章目录 源代码github地址 摘要 2CLSTM 过程 1. 词嵌入 2. 2LSTM处理 3. CNN学习LSGCNN学习LSG 4. Softmax分类 源代码github地址 https:/ ...
- 微软看上的Rust 语言,安全性真的很可靠吗
摘要:近几年,Rust语言以极快的增长速度获得了大量关注.其特点是在保证高安全性的同时,获得不输C/C++的性能.在Rust被很多项目使用以后,其实际安全性表现到底如何呢? 近几年,Rust语言以极快 ...
- sharedb结合elementUi编写的实时小工具
我是使用sharedb 作为后端 ,然后前端使用的elementUI样式,编写的一个值班小工具.接下来,让我们先来了解一下sharedb是什么吧? sharedb工具 github地址:https:/ ...
- 前端面试?这份手撸Promise请你收下
前言 现在很多大厂面试前端都会要求能够手动的写出一个Promise,所以这里整理了一份手写的Promise. 绝对详细,功能绝对强大.如果你不了解Promise的基本使用,那么本篇文章可能不太适合你, ...