PAT1058 A+B in Hogwarts

3.38 工业缺陷检测实战:物体表面缺陷检测,从图像处理到深度学习 本文介绍了工业缺陷检测的完整流程,从传统图像处理到深度学习方法。首先定义了缺陷检测任务的目标和应用场景,然后详细讲解了传统图像处理方法(边缘检测、阈值分割等)和深度学习方法(分类、检测、分割模型)。文章最后总结了核心要点,提出了思考题和实践建议,建议从简单方法开始逐步优化。下一篇将介绍工业视觉基础技术——相机标定与角点检测。 阅读详情

原题

在这里插入图片描述

题目大意及思路

  • 类似于全加器,只要记得把后面的进位加上就行

代码

#include<iostream>
using namespace std;
int main(){
	long int g1,g2,g;
	int s1,s2,s,k1,k2,k;
	scanf("%ld\.%d\.%d %ld\.%d\.%d",&g1,&s1,&k1,&g2,&s2,&k2);
	k=(k1+k2)%29;
	s=(s1+s2+(k1+k2)/29)%17;
	g=g1+g2+(s1+s2+(k1+k2)/29)/17;
	printf("%ld\.%d\.%d\n",g,s,k);
	return 0;
}

运行截图

在这里插入图片描述

收获

输入格式:(带“.”的用“\”加以转义)

scanf("%ld\.%d\.%d %ld\.%d\.%d",&g1,&s1,&k1,&g2,&s2,&k2);
FLUENT Meshing Watertight Geometry工作流入门 - 9 生成体网格 总结一下我们学到的东西。讨论体积网格的重要性,并了解生成体积网格的不同方法。还了解体积网格质量的重要性,并学习如何改进它。 阅读详情

相关推荐

2026年ERP选型实战:按规模分档,避开成本与实施陷阱

企业资源计划(ERP)是现代企业数字化转型的核心系统,它将财务、供应链、制造、人力等业务整合到统一平台。随着云计算和人工智能技术的发展,ERP已从传统本地部署的记录工具演变为SaaS订阅制、具备AI辅助决策能力的智能运营平台。不同规模企业在选型时的关注点差异巨大:小微企业追求轻量化和快速出报表,中型企业需要在流程标准化与业务灵活性间取得平衡,大型集团则注重多法人管控和数据治理。此外,制造、电商、工程等行业对ERP的模块要求也各有侧重,成本核算数据跑不通更是普遍痛点。如何结合企业规模与行业特征,制定合理的选型

weixin_34320724的博客 382

【PAT 甲级】1058 A+B in Hogwarts (20 分)

1058A+B in Hogwarts(20分) If you are a fan of Harry Potter, you would know the world of magic has its own currency system -- as Hagrid explained it to Harry, "Seventeen silver Sickles to a Galleon ...

CrystalXueNing的博客 250

【一键搞定】ThinkPHP6.0.2+PHPStudy+Composer极速安装指南——附完整下载包与避坑技巧

本文提供了一份ThinkPHP6.0.2的完整下载包,并详细介绍了如何配合PHPStudy和Composer进行极速安装与配置。指南涵盖了环境准备、Composer国内镜像加速、项目部署及常见避坑技巧,旨在帮助开发者,尤其是内网或网络不佳的用户,快速搭建可运行的TP6开发环境,绕过依赖下载的繁琐步骤。

assembly8low的博客 1016

PAT A1058 A+B in Hogwarts

PAT A1058 A+B in Hogwarts Sample Input: 3.2.1 10.16.27 Sample Output: 14.1.28 思路1: 简单加法模拟 code1: #include <stdio.h> int Galleon[3], Sickle[3], Knut[3]; int carry; //进位 int main(){ fo...

qq_42347617的博客 180

(P2)PALM软件的基本使用流程

上一篇介绍了PALM在Ubuntu系统上的下载安装及安装后的目录文件结构,这一篇以自带的案例介绍软件的基本操作流程。(请转至example_cbl项目) 输入 声明:官网均有各个变量的说明,以下代码来自软件自带案例 palm的最小输入文件是p3d文件,以下是example_cbl_p3d的详细说明。(文件语言格式Fortran,请自行先学习下语言的基本语法。笔者也是新学者,有非常多的问题,很多参数也不能准确的说出是什么意思,还请不吝赐教,谢谢!!!) !几点说明 !1、该运行文件基本由三大块组成:1)in

ysqzhatian的博客 3267

滑模控制理论(SMC)概述

滑模控制理论(SMC)概述一、背景二、数学理论三、高维拓展四、分析 一、背景 滑模控制理论(Sliding Mode Control, SMC)是一种建立在现代控制理论基础上的控制理论,主要数学核心为李雅普诺夫函数。 滑模控制的核心思想是建立一个滑模面,将被控系统拉取到滑模面上来,使系统沿着滑模面运动。滑模控制的一个优势是无视外部扰动和不确定参数,采用一种比较“暴力”的方式达到控制的目的。 其思想和反步法有些类似,但数学实现起来更加方便而不抽象。相比反步法,滑模控制没有复杂的数学计算,也不会出现“微分爆炸”

高能阿博特的博客 6万+

[PAT A1058]A+B in Hogwarts

[PAT A1058]A+B in Hogwarts 题目描述 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 – as Hagrid explained it to Harry, “Seventeen...

欢迎来到我的编程小屋 694

格拉姆角场(GAF)实战:用Python实现时间序列图像化处理

本文深入解析了格拉姆角场(GAF)技术,这是一种将一维时间序列转化为二维图像特征的方法,以便利用卷积神经网络(CNN)等图像模型进行深度分析。文章通过Python实战代码,详细演示了GASF和GADF两种核心转换的实现过程,并探讨了其在时序数据分类任务中的应用,为故障预警、金融模式识别等场景提供了强大的图像驱动分析视角。

weixin_29079671的博客 279

[PAT-A 1058]A+B in Hogwarts

题目大意: 如果你是哈利·波特迷,你会知道魔法世界有它自己的货币系统 —— 就如海格告诉哈利的:“十七个银西可(Sickle)兑一个加隆(Galleon),二十九个纳特(Knut)兑一个西可,很容易。”现在,给定哈利应付的价钱 AB,求A+B 以Galleon.Sickle.Knut格式输出 思路:吧Galleon.Sickle.Knut格式换成n个Knut然后相加,最后对和再转换回Galleo...

RegulusF的博客 277

别慌!Oracle MOS登录页面大变样?5分钟搞定新旧账号登录全流程

本文详细解析Oracle MOS登录页面改版后的新旧账号登录流程,帮助用户快速适应账号体系变革。针对传统MOS账号和OCI账号的不同应用场景,提供5分钟内完成无缝切换的实用指南,包括登录步骤、书签设置和密码管理策略,助力数据库管理用户高效访问Oracle技术支持资源。

weixin_30275415的博客 529

2.Vivado软件基础操作

在本章节,我们以一个简单的计数器实例,介绍FPGA开发软件Vivado的基础操作流程,计数器实例程序的设计,在本课程中先不同掌握,后续课程将针对verilog编程进行讲解。 打开Vivado软件,会看到如下的界面: 点击如下图所示的: 点击Next> 将这个地方,设置路径,注意路径必须是英文路径。且文件夹名称第一个字符不能为数字。所有路径的名称的字符数量不能超过144个符号。 点击Next> 点击Next> 点...

FPGA/MATLAB学习教程/源码/项目合作开发 4489

【PAT甲级A1058】A+B in Hogwarts (20分)(c++)

1058 A+B in Hogwarts (20分) 作者:CHEN, Yue 单位:浙江大学 代码长度限制:16 KB 时间限制:400 ms 内存限制:64 MB If you are a fan of Harry Potter, you would know the world of magic has its own currency system – as Hagrid explained it to Harry, “Seventeen silver Sickles to a Galleon an

小庄同学的博客 351

SpringBoot如何正确连接SqlServer(亲测可用)

对于SpringBoot连接SqlServer的方式和常见的错误的汇总。1、驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。2、com.microsoft.sqlserver.jdbc.SQLServerException: 对象名 ‘DUAL‘ 无效。

黄团团的个人博客 2万+

PAT_A1058 | A+B in Hogwarts

1058 A+B in Hogwarts (20point(s)) If you are a fan of Harry Potter, you would know the world of magic has its own currency system -- as Hagrid explained it to Harry, "Seventeen silver Sickles to a G...

weixin_43787043的博客 425

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

PAT 1058 A+B in Hogwarts python解法

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 – as Hagrid explained it to Harry, “Seventeen silver Sickles to a Galleon an...

qq_36936510的博客 320

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

【PAT A1058】A+B in Hogwarts

【PAT A1058】A+B in Hogwarts Question Description If you are a fan of Harry Potter, you would know the world of magic has its own currency system -- as Hagrid explained it to Harry, "Seventeen silver S...

Jeremy.Rin的博客 207

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

PAT1 1058 A+B in Hogwarts

题目链接 我的github 题目大意 有三种巫师货币:Knuts、silver Sickles、Galleon 它们之间的转换关系: 29Knuts=1silver Sickles 17silver Sickles=1Galleon 现在给出A和B手上的巫师币,求他们巫师币之和 输入 每组包含一个测试用例,每个用例以一行输入,格式为: ...

LSC_333的博客 427

【PAT】A1058 A+B in Hogwarts【进制转换】

If you are a fan of Harry Potter, you would know the world of magic has its own currency system – as Hagrid explained it to Harry, “Seventeen silver Sickles to a Galleon and twenty-nine Knuts to a Sic...

elegant coder 438

PAT甲级 1058 A+B in Hogwarts

If you are a fan of Harry Potter, you would know the world of magic has its own currency system -- as Hagrid explained it to Harry, "Seventeen silver Sickles to a Galleon and twenty-nine Knuts to a Sickle, it's easy enough." Your job is to write a program

polarours的博客 334

【PAT甲级 - C++题解】1058 A+B in Hogwarts

📣专栏定位:为想考甲级PAT的小伙伴整理常考算法题解,祝大家都能取得满分!

Newin2020的博客 545

PAT A1058 A+B in Hogwarts (20分)

PAT A1058 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 – as Hagrid explained it to Harry, “Seventeen silver Sickles to a Galleon and twenty-nine Knuts to a Sickle, it’s

kyln1039的博客 186

[PAT A1058] A+B in Hogwarts

Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits). Input Specification: Each input file contains one test case. Each case contains a pair of

芭芭拉冲鸭!的博客 205

PAT Advanced 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 currency system – as Hagrid explained it to Harry, “Seventeen silver Sickles to a Galleon and twen...

ZQYnn's blog 264

PAT 1058 A+B in Hogwarts

题目 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 – as Hagrid explained it to Harry, “Seventeen silver Sickles to a Galleon...

领导的博客 174

PAT A1058:A+B in Hogwarts

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 – as Hagrid explained it to Harry, “Seventeen silver Sickles to a Galleon and twenty-nine Knuts to a Sickle, it’s easy enough.” Your

lilian的博客 266
上一篇: PAT1055 The World‘s Richest(结构体排序)
下一篇: PAT1066 Root of AVL Tree(AVL)
鲤鱼酒酒
博客等级 码龄7年 6粉丝 126原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值