A1001】的更多相关文章

从今天起每天刷1-2题PAT甲级 第一天 A1001 A+B Format (20 分) 题目内容 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 fi…
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 Each input file contains one test case. Each case contains a pair of integer…
AC代码 #include <cstdio> #include <algorithm> using namespace std; const int maxn = 11; int main() { #ifdef ONLINE_JUDGE #else freopen("1.txt", "r", stdin); #endif // ONLINE_JUDGE long long a, b; scanf("%lld %lld",…
两数相加,结果每三位添加一个逗号.一开始没有注意到%03d的问题,因为有某些数据逗号分割后高位带0,因此需要用0来补充空位. #include<iostream> #include<stdio.h> using namespace std; int main(){ int a,b; scanf("%d%d",&a,&b); int sum=a+b; ){ printf("-"); sum=-sum; } ) printf(&q…
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 pa…
B1024. 科学计数法 (20) Description: 科学计数法是科学家用来表示很大或很小的数字的一种方便的方法,其满足正则表达式[+-][1-9]"."[0-9]+E[+-][0-9]+,即数字的整数部分只有1位,小数部分至少有1位,该数字及其指数部分的正负号即使对正数也必定明确给出. 现以科学计数法的格式给出实数A,请编写程序按普通数字表示法输出A,并保证所有有效位都被保留. Input: 每个输入包含1个测试用例,即一个以科学计数法表示的实数A.该数字的存储长度不超过99…
最近快被 Hibernate 给坑哭了,有了自己动手实现 ORM 映射 DAO 的冲动. 工作之余折腾了快一星期,总算是有点小成就. 现打算将过程记录下来,方便自己后续回顾填补遗漏. 1. 传统 JDBC 实现过程 无论你项目中使用的是什么样的 ORM 框架[Hibernate/MyBatis.....],或者是现在大热的领域模型 DSL DAO层,都是在传统 JDBC的基础上进行的封装. 骚年如果你上手就是 DAO 层框架,没有见过上述的几个家伙的话,建议你反编译 JDK去和他们打个招呼. 传…
List A和B A.removeAll(B); A.addAll(B); 例如有如下实体类: /** * hashset是如何保持元素的唯一性呢? * 是通过元素的hashcode和equals来表示: * 如果hashCode值一样,则比较equals是否为true * 如果hashCode值不一样,不用比较equals */ /** * List是如何集合中元素相同的呢? * 是通过元素的hashcode和equals来表示: * 如果hashCode值一样,则比较equals是否为tru…
如果app走的是http协议,不用root,只需要通过fiddler做代理,就可以抓到所有请求. 1. fiddler+手机wifi设置 安装fiddler,勾中 Fiddler Options -> https -> Decrypt Https traffic 和 Connections -> Allow remote computers to connect .重启之后,fiddler就在默认端口8888开始监听了. 手机上的wifi设置里,选择 手动 代理,主机名为PC的IP地址比…
部分常见ORACLE面试题以及SQL注意事项 一.表的创建: 一个通过单列外键联系起父表和子表的简单例子如下: CREATE TABLE parent(id INT NOT NULL, PRIMARY KEY (id) ) CREATE TABLE child(id INT, parent_id INT, INDEX par_ind (parent_id), FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE ) 建表时…