PTA-1002】的更多相关文章

import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String n = sc.next(); Map<Integer, String> map = new HashMap<Integer, String>(); map.put(1, "yi"); map.put(2, "…
问题描述: This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial: K N​1​​ a​N​1​​​​ N​2​​ …
1002 A+B for Polynomials This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial: K N​1…
一 1002 写出这个数  读入一个正整数 n,计算其各位数字之和,用汉语拼音写出和的每一位数字. 输入格式: 每个测试输入包含 1 个测试用例,即给出自然数 n 的值.这里保证 n 小于 10​100​​. 输出格式: 在一行内输出 n 的各位数字之和的每一位,拼音数字间有 1 空格,但一行中最后一个拼音数字后没有空格. 输入样例: 1234567890987654321123456789 输出样例: yi san wu 二 #include <stdio.h> #define MAX 10…
1002 写出这个数 题目描述 读入一个正整数 n,计算其各位数字之和,用汉语拼音写出和的每一位数字. 输入格式 每个测试输入包含 1 个测试用例,即给出自然数 n 的值.这里保证 n 小于 10^100 . 输出格式 在一行内输出 n 的各位数字之和的每一位,拼音数字间有 1 空格,但一行中最后一个拼音数字后没有空格. 输入样例 1234567890987654321123456789 输出样例 yi san wu AC: #include<stdio.h> #include<stri…
PTA题目集7-9总结 一.前言 题目集七:该题集为轮到图形卡片排序游戏题,主要考查的知识点有类的继承,ArrayList泛型的使用,Compabale接口的运用,多态的使用方法以及接口的应用,难度较难,题量适中: 题目集八:这个题集都为一道ATM机类结构设计题,主要考查的知识点有各实体类之间的关系,尤其是一对多的组合关系.对实体类的设计要做到单一职责原则,且不能缺少规定的实体类.编程时考虑面向对象中的封装性本题目中的应用以及是否有能够扩展 的衍生需求.对我来说这道题难度很大,开始有点无从下手,…
Bestcoder#5 1002 Poor MitsuiTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 336    Accepted Submission(s): 70 Problem Description Because of the mess Mitsui have made, (not too long ago, Mitsui,…
最近突然想往算法方向走走,做了做航电acm的几道题 二话不说,开始 航电acm 1002 题主要是处理长数据的问题,算法原理比较简单,就是用字符数组代替int,因为int太短需要处理的数据较长 下面是问题描述: Problem Description I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.     Input The f…
题目:http://acm.hdu.edu.cn/showproblem.php?pid=5610 如果杠铃总质量是奇数直接impossible 接着就考验耐心和仔细周全的考虑了.在WA了三次后终于发现问题了,想对自己说是不是撒 首先最好从大的那个开始考虑,我的方案就是两数交换一下,结果输出的时候没有考虑... 然后就是要求a+b最小,那么循环就要从大的开始向小的循环. 其实我也解释不清楚,更解释不清楚的是学长取名的Baby Nero,一直以为铭铭姐是女的的我,在看到真的铭神的照片的时候惊呆了…
题目链接:https://www.patest.cn/contests/pat-a-practise/1002 原题如下: This time, you are supposed to find A+B where A and B are two polynomials. Input Each input file contains one test case. Each case occupies 2 lines, and each line contains the information…