【PAT甲级】1058 A+B in Hogwarts (20 分)
题意:
输入两组,每组三个非负整数A,B,C(A<=1e7,B<17,C<29),输出相加的和。(类似个位上29进制,十位上17进制运算)
AAAAAccepted code:
- #define HAVE_STRUCT_TIMESPEC
- #include<bits/stdc++.h>
- using namespace std;
- int main(){
- ios::sync_with_stdio(false);
- cin.tie(NULL);
- cout.tie(NULL);
- int a,b,c,d,e,f;
- char s,ss,sss,ssss;
- cin>>a;
- cin>>s;
- cin>>b;
- cin>>ss;
- cin>>c;
- cin>>d;
- cin>>sss;
- cin>>e;
- cin>>ssss;
- cin>>f;
- int x=c+f,y=b+e,z=a+d;
- if(x>)
- x-=,++y;
- if(y>)
- y-=,++z;
- cout<<z<<"."<<y<<"."<<x;
- return ;
- }
【PAT甲级】1058 A+B in Hogwarts (20 分)的更多相关文章
- PAT 甲级 1058 A+B in Hogwarts (20 分) (简单题)
1058 A+B in Hogwarts (20 分) If you are a fan of Harry Potter, you would know the world of magic ha ...
- PAT Advanced 1058 A+B in Hogwarts (20 分)
If you are a fan of Harry Potter, you would know the world of magic has its own currency system -- a ...
- 1058 A+B in Hogwarts (20分)
1058 A+B in Hogwarts (20分) 题目: If you are a fan of Harry Potter, you would know the world of magic h ...
- PAT甲级:1136 A Delayed Palindrome (20分)
PAT甲级:1136 A Delayed Palindrome (20分) 题干 Look-and-say sequence is a sequence of integers as the foll ...
- PAT甲级——1058 A+B in Hogwarts
1058 A+B in Hogwarts If you are a fan of Harry Potter, you would know the world of magic has its own ...
- PAT 甲级 1054 The Dominant Color (20 分)
1054 The Dominant Color (20 分) Behind the scenes in the computer's memory, color is always talked ab ...
- PAT 甲级 1027 Colors in Mars (20 分)
1027 Colors in Mars (20 分) People in Mars represent the colors in their computers in a similar way a ...
- PAT 甲级 1005 Spell It Right (20 分)
1005 Spell It Right (20 分) Given a non-negative integer N, your task is to compute the sum of all th ...
- PAT 甲级 1031 Hello World for U (20 分)(一开始没看懂题意)
1031 Hello World for U (20 分) Given any string of N (≥) characters, you are asked to form the char ...
- PAT 甲级 1023 Have Fun with Numbers (20 分)(permutation是全排列题目没读懂)
1023 Have Fun with Numbers (20 分) Notice that the number 123456789 is a 9-digit number consisting ...
随机推荐
- 关于微信小程序的分包
最近开始一份新的工作,接手一个正在开发的小程序,第一步添加客服系统,我们用的网易七鱼,利用微信小程序SDK接入的方式,一顿操作之后,欧欧~~!!~~~,提示没法预览, 究其原因,资源包过大,微信小程序 ...
- poj 1611 :The Suspects经典的并查集题目
Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized ...
- 刷题2. Add Two Numbers
一.题目要求 You are given two non-empty linked lists representing two non-negative integers. The digits a ...
- HTTP状态码详解(上)
HTTP状态码的英文为 HTTP Status Code.下面是常见的HTTP状态码: 200 - 请求成功 301 - 资源(网页等)被永久转移到其它URL 404 - 请求的资源(网页等)不存在 ...
- truffle编译合约常见问题及其在私链上的部署与交互
一.初始化truffle项目 truffle init //初始化truffle项目文件夹 将写好的合约文件放到contract文件夹中 truffle compile //编译合约 (注意!! ...
- drf大总结
接口 """ 1.什么是接口:url+请求参数+响应数据 | 接口文档 2.接口规范: url:https,api,资源(名词复数),v1,get|post表示操作资源的 ...
- 概率dp light1038
题意:问一个数一步步除以他的除数,最后转移到1,所需要的期望步数. 思路,概率dp问题,从结果逆推,本题是从1开始往后推,怎么个推法呢.参考一下别人的博客: 求操作次数的期望时,先设定第i个因子给期望 ...
- Abaqus 载荷分类(部分)
目录 1. 集中载荷 1.1 集中载荷施加方法 1.2 定义集中跟随力 1.3 指定文件定义集中节点力 2. 分布载荷 2.1 分布载荷分类 3. 热载荷 3.1 模拟热辐射 3.2 直接定义热流量 ...
- 数据库程序接口——JDBC——API解读第二篇——执行SQL的核心对象
结构图 核心对象 Statement Statement主要用来执行SQL语句.它执行SQL语句的步骤为: 第一步:创建statement对象. 第二步:配置statement对象,此步骤可以忽略. ...
- Debian 系统修改网卡ens33名称为 eth0
1. 编辑文件 /etc/default/grub 修改下面的值 初始值 GRUB_CMDLINE_LINUX="" 修改后 GRUB_CMDLINE_LINUX="ne ...