1073 Scientific Notation(20 分) Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9].[0-9]+E[+-][0-9]+ which means that the integer portion has exa…
1073 Scientific Notation (20 分)   Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9].[0-9]+E[+-][0-9]+ which means that the integer portion has…
1073 Scientific Notation (20 分)   Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9].[0-9]+E[+-][0-9]+ which means that the integer portion has…
1073 Scientific Notation (20 分) Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9].[0-9]+E[+-][0-9]+ which means that the integer portion has ex…
Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9].[0-9]+E[+-][0-9]+ which means that the integer portion has exactly one digit, there is at lea…
Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9].[0-9]+E[+-][0-9]+ which means that the integer portion has exactly one digit, there is at lea…
科学计数法是科学家用来表示很大或很小的数字的一种方便的方法,其满足正则表达式 [+-][1-9].[0-9]+E[+-][0-9]+,即数字的整数部分只有 1 位,小数部分至少有 1 位,该数字及其指数部分的正负号即使对正数也必定明确给出. 现以科学计数法的格式给出实数 A,请编写程序按普通数字表示法输出 A,并保证所有有效位都被保留. 输入格式: 每个输入包含 1 个测试用例,即一个以科学计数法表示的实数 A.该数字的存储长度不超过 9999 字节,且其指数的绝对值不超过 9999. 输出格式…
Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9].[0-9]+E[+-][0-9]+ which means that the integer portion has exactly one digit, there is at lea…
题目如下: Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9]"."[0-9]+E[+-][0-9]+ which means that the integer portion has exactly one digit, th…
题意:给出科学计数法的格式的数字A,要求输出普通数字表示法,所有有效位都被保留,包括末尾的0. 分两种情况,一种E+,一种E-.具体情况具体分析╮(╯_╰)╭ #include <iostream> #include <cstdio> #include <algorithm> #include <string.h> #include <cmath> #define POSITIVE 1 #define NEGATIVE 2 using names…
简单模拟题. #include<cstdio> #include<cstring> #include<cmath> #include<vector> #include<map> #include<stack> #include<queue> #include<string> #include<algorithm> using namespace std; ]; int p; int main() {…
题意: 输入科学计数法输出它表示的数字. AAAAAccepted code: #define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; string s; ]; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin>>s; int n=s.size(); ]=='-') cout<<…
题意: 给出科学计数法的形式,转化成常规的表示,要求保留所有的有效位数 思路:纯粹的字符串处理问题,注意边界条件即可.如+1.23E+02这种,转化后是123,既不需要补0,也不需要添加小数点. 代码: #include <iostream> #include <string> using namespace std; string change(string str) { string ans,sign; ]=='-') sign="-"; str.erase…
Source: PAT A1073 Scientific Notation (20 分) Description: Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9].[0-9]+E[+-][0-9]+ which means that…
Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9].[0-9]+E[+-][0-9]+ which means that the integer portion has exactly one digit, there is at lea…
Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9]"."[0-9]+E[+-][0-9]+ which means that the integer portion has exactly one digit, there is…
    This is a known issue, you can find more in internet. Excel will treat text(can display with number) more than 11 numbers, it will convert to scientific notation display. It is not an issue now, but if your text content length is more than 15, th…
PAT 1073. 多选题常见计分法 批改多选题是比较麻烦的事情,有很多不同的计分方法.有一种最常见的计分方法是:如果考生选择了部分正确选项,并且没有选择任何错误选项,则得到50%分数:如果考生选择了任何一个错误的选项,则不能得分.本题就请你写个程序帮助老师批改多选题,并且指出哪道题的哪个选项错的人最多. 输入格式: 输入在第一行给出两个正整数N(<=1000)和M(<=100),分别是学生人数和多选题的个数.随后M行,每行顺次给出一道题的满分值(不超过5的正整数).选项个数(不少于2且不超过…
1060 Are They Equal(25 分) If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0.123×10​5​​ with simple chopping. Now given the number of significant digits on a machin…
Hierarchical Notation Time Limit: 2 Seconds      Memory Limit: 131072 KB In Marjar University, students in College of Computer Science will learn EON (Edward Object Notation), which is a hierarchical data format that uses human-readable text to trans…
Problem Description Ignatius is building an Online Judge, now he has worked out all the problems except the Judge System. The system has to read data from correct output file and user's result file, then the system compare the two files. If the two f…
如题,统计PAT出现的个数,注意PAT不一定要相邻,看题目给的例子就知道了. num1代表目前为止P出现的个数,num12代表目前为止PA出现的个数,num123代表目前为止PAT出现的个数. 遇到P,num1++. 遇到A,那么PA的个数为:前面统计的PA的个数(num12)+前面的P与当前A组成的个数(num1) 遇到T,那么PAT的个数为:前面统计的PAT的个数(num123)+前面的PA与当前的T组成的个数(num12) #include <iostream> #include <…
1073 多选题常见计分法(20 分) 批改多选题是比较麻烦的事情,有很多不同的计分方法.有一种最常见的计分方法是:如果考生选择了部分正确选项,并且没有选择任何错误选项,则得到 50% 分数:如果考生选择了任何一个错误的选项,则不能得分.本题就请你写个程序帮助老师批改多选题,并且指出哪道题的哪个选项错的人最多. 输入格式: 输入在第一行给出两个正整数 N(≤1000)和 M(≤100),分别是学生人数和多选题的个数.随后 M 行,每行顺次给出一道题的满分值(不超过 5 的正整数).选项个数(不少…
批改多选题是比较麻烦的事情,有很多不同的计分方法.有一种最常见的计分方法是:如果考生选择了部分正确选项,并且没有选择任何错误选项,则得到50%分数:如果考生选择了任何一个错误的选项,则不能得分.本题就请你写个程序帮助老师批改多选题,并且指出哪道题的哪个选项错的人最多. 输入格式: 输入在第一行给出两个正整数N(<=1000)和M(<=100),分别是学生人数和多选题的个数.随后M行,每行顺次给出一道题的满分值(不超过5的正整数).选项个数(不少于2且不超过5的正整数).正确选项个数(不超过选项…
#include <iostream> using namespace std; string a; int expo; int dotPos; int expoPos; int i; int main(){ cin>>a; if(a[0]=='+'||a[0]=='-'){ if(a[0]=='-'){cout<<"-";} a.erase(a.begin()); } for(i=0;i<a.size();i++){ if(a[i]=='.'…
批改多选题是比较麻烦的事情,有很多不同的计分方法.有一种最常见的计分方法是:如果考生选择了部分正确选项,并且没有选择任何错误选项,则得到 50% 分数:如果考生选择了任何一个错误的选项,则不能得分.本题就请你写个程序帮助老师批改多选题,并且指出哪道题的哪个选项错的人最多. 输入格式: 输入在第一行给出两个正整数 N(≤1000)和 M(≤100),分别是学生人数和多选题的个数.随后 M 行,每行顺次给出一道题的满分值(不超过 5 的正整数).选项个数(不少于 2 且不超过 5 的正整数).正确选…
博主欢迎转载,但请给出本文链接,我尊重你,你尊重我,谢谢~http://www.cnblogs.com/chenxiwenruo/p/6102219.html特别不喜欢那些随便转载别人的原创文章又不给出链接的所以不准偷偷复制博主的博客噢~~ 时隔两年,又开始刷题啦,这篇用于PAT甲级题解,会随着不断刷题持续更新中,至于更新速度呢,嘿嘿,无法估计,不知道什么时候刷完这100多道题. 带*的是我认为比较不错的题目,其它的难点也顶多是细节处理的问题~ 做着做着,发现有些题目真的是太水了,都不想写题解了…
树(23) 备注 1004 Counting Leaves   1020 Tree Traversals   1043 Is It a Binary Search Tree 判断BST,BST的性质 1053 Path of Equal Weight   1064 Complete Binary Search Tree 完全二叉树的顺序存储,BST的性质 1066 Root of AVL Tree 构建AVL树,模板题,需理解记忆 1079 Total Sales of Supply Chain…
今天开个坑,分类整理PAT甲级题目(https://pintia.cn/problem-sets/994805342720868352/problems/type/7)中1051~1100部分.语言是modern C++. 为什么要整理呢,因为我2019年9月要考PAT甲级,虽然是第一次考,虽然只学了数据结构(https://mooc.study.163.com/course/1000033001?tid=2402970002#/info),但我要冲着高分(2019年9月8日更新:满分)去. 下…
2019/4/3 1063 Set Similarity n个序列分别先放进集合里去重.在询问的时候,遍历A集合中每个数,判断下该数在B集合中是否存在,统计存在个数(分子),分母就是两个集合大小减去分子. // 1063 Set Similarity #include <set> #include <map> #include <cstdio> #include <iostream> #include <algorithm> using name…