Redian新闻
>
Venmo 一人注两号倒钱有被抓么
avatar
Venmo 一人注两号倒钱有被抓么# Money - 海外理财
o*y
1
consider the process of stepping from integer x to integer y along the
integer points of the straight line. The length of each step must be non-
negative and can be one bigger than, equal to, or one smaller than the
length of the previous step.
What is the minimum number of steps in order to get from x to y? the length
of both the first and the last step must be 1.
INPUT:
the input begins with a line containing the number of test cases - n. Each
test case that follows consists of a line with two integers: 0 <= x <= y <=
2^31.
OUTPUT:
for each test case, print a line giving the minimal number of steps to get
from x to y.
Sample input:
3
45 48
45 49
45 50
Sample output:
3
3
4
很有趣的一道题:)
avatar
y*m
2
来回倒每月4k,有被抓么..
avatar
i*e
3
My solution:
int min_steps(int x, int y) {
int n = y-x;
if (n == 0) return 0;
int peak = (int)sqrt((double)n);
if (peak*peak == n)
return 2*peak-1;
else if (peak*(peak+1) >= n)
return 2*peak;
else
return 2*peak+1;
}
Update: 忘了检查 x==y 的特殊情况。。。加了特殊情况检测~
一些常见面试题的答案与总结 -
http://www.ihas1337code.com
avatar
s*c
4
你不能多搞几个,非得来回转啊
avatar
s*r
5
试试回头更新哈~
avatar
y*m
6
省事..

【在 s**c 的大作中提到】
: 你不能多搞几个,非得来回转啊
avatar
b*3
7
my account is frozen ..after i made 3 different payments($30, $8, $5) to the
same person in 5 minutes. also a $900 payment several days ago to the same
person
avatar
s*c
8
你要是非找venmo挑衅,也随便你

【在 y***m 的大作中提到】
: 省事..
avatar
z*5
9
彻底关了?那资金冻住了么?

the
same

【在 b*****3 的大作中提到】
: my account is frozen ..after i made 3 different payments($30, $8, $5) to the
: same person in 5 minutes. also a $900 payment several days ago to the same
: person

avatar
y*m
10
看venmo松不松, 严打就算了...

【在 s**c 的大作中提到】
: 你要是非找venmo挑衅,也随便你
avatar
D*E
11
几个人凑一圈倒钱的几个月前刚开始的时候都大把被冻结的,别说你来回倒的了。不过
被冻的好多都是好几个月刚开的时候,你现在可以试试,也许现在放松管制了。

【在 y***m 的大作中提到】
: 来回倒每月4k,有被抓么..
avatar
c*d
12
这种单向转钱被封的理由是什么?venmo的目的不就是干这个的么

the
same

【在 b*****3 的大作中提到】
: my account is frozen ..after i made 3 different payments($30, $8, $5) to the
: same person in 5 minutes. also a $900 payment several days ago to the same
: person

avatar
s*g
13
频率太高了吧?

【在 c*****d 的大作中提到】
: 这种单向转钱被封的理由是什么?venmo的目的不就是干这个的么
:
: the
: same

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。