REQg


  • 首页

  • 标签

  • 分类

  • 归档

  • 搜索

Codeforces Beta Round #91 (Div. 2 Only) A. Lucky Division

发表于 2019-01-13 | 分类于 Codeforces题解

http://codeforces.com/problemset/problem/122/A

题意:在1到1000,找出可以被幸运数字整除的数字。

PS:
因为输入范围较小,遍历所有可能即可。
注意,有些比如444,777,44,77是满足第一行的,就不要写了。

代码:

阅读全文 »

Codeforces Beta Round #89 (Div. 2) A. String Task

发表于 2019-01-13 | 分类于 Codeforces题解

http://codeforces.com/problemset/problem/118/A

题意:
按要求处理字符串,并输出。
忽略所有元音。
在所有的福音前加.。

代码:

阅读全文 »

Codeforces Beta Round #85 (Div. 2 Only) A. Petya and Strings

发表于 2019-01-13 | 分类于 Codeforces题解

http://codeforces.com/problemset/problem/112/A

题意:
无视大小写的情况下,比较2个字符串的字典序大小。
a大于b输出1,小于输出-1,等于则为0。

PS:
字典序:a最小,z最大。aa < ab;
因为C++刚好支持对字符串的大小比较,并且重载了== > <三个符号。
但需要先都转为小写。

代码:

阅读全文 »

Codeforces Beta Round #84 (Div. 2 Only) A. Nearly Lucky Number

发表于 2019-01-13 | 分类于 Codeforces题解

http://codeforces.com/problemset/problem/110/A

题意:如果一个数字幸运数字的个数为幸运数字,则称它几乎是一个幸运数字。

代码:

阅读全文 »

Codeforces Round #495 (Div. 2) A. Sonya and Hotels

发表于 2019-01-12 | 分类于 Codeforces题解

http://codeforces.com/problemset/problem/1004/A

题意:
土豪开了n家酒店,他希望新建的酒店距离最近的酒店距离=d。
给出n家酒店的坐标,求有几个点可以建新酒店。
注:所有酒店都是在一条直线上。

PS:这里的if有一点巧思,刚好可以应付距离大于2d,等于2d和小于2d三种情况。

代码:

阅读全文 »

PAT 1001 A+B Format

发表于 2019-01-06 | 分类于 PAT(Advanced Level)题解

题意:把a和b相加,按要求格式输出。(每3个数用逗号隔开)

PS:
sum的绝对值最大为2000000
输出的格式就是西方表示数字的方法。千位和百万为。
可以用千分制来理解。
稍微容易马虎的在代码中e++和–e还有e–的区别。
把最后输出的部分拿出来,会有一个数据段错误。因为没具体数字,不知为何。

代码:

阅读全文 »

How the super-rich invest

发表于 2019-01-05 | 分类于 《经济学人》每周精读

DECEMBER 15TH-21ST 2018



The family offices through which the world’s wealthiest 0.001% invest are a new force in global finance that few have heard of

THINK OF THE upper echelons of the money-management business, and the image that springs to mind is of fusty private banks in Geneva or London’s Mayfair, with marble lobbies and fake country-house meeting-rooms designed to make their super-rich clients feel at home. But that picture is out of date. A more accurate one would feature hundreds of glassy private offices in California and Singapore that invest in Canadian bonds, European property and Chinese startups—and whose gilded patrons are sleepwalking into a political storm.

阅读全文 »

Video games in China: One in the eye

发表于 2019-01-03 | 分类于 《经济学人》每周精读

SEPTEMBER 8TH-14TH 2018



LAST December, at a conference in the southern city of Guangzhou, Pony Ma joked that he felt a little nervous to be parted from his phone while on stage. He was responding to criticism about the addictive nature of smartphones, fuelled by what some in China call “electronic opium”: video games, among Tencent’s best-known products and its single-biggest revenue source. Mr Ma, its boss (and China’s richest man, according to the latest annual ranking from Forbes, a magazine), added that his myopia had worsened of late and that eye strain was “also a problem”.

阅读全文 »
1…78

REQg

78 日志
4 分类
22 标签
© 2020 REQg
由 Hexo 强力驱动
|
主题 — NexT.Mist v5.1.4
浙ICP备 - 19004121号