fried-chicken's blog

By fried-chicken, history, 3 years ago, In English

This is a problem from 2021 ICPC Shannxi invitational and confuse me a lot. Since this contest have neither place to up-solving nor tutorial, I'm here to ask for idea and help.

The problem is like:

Given a number X, we call another number N is a lucky number to X if:

  1. N is larger than 1e8;
  2. N is smaller than 1e13;
  3. (N!) begins with X.

For example, if we ignore the first constraint, N=10 is a lucky number to X=3628 since (10!)=3628800.

Now, given T testcases, each testcases gives you a X, output any N where N is a lucky number to X.

T is smaller than 200 and X is smaller than 1e5.

Sample input

2

494

997

Sample output

1000001586369

1000001980150

UPD: Thanks everybody for helping, I think using stirling's and brute force is the right one.

Full text and comments »

  • Vote: I like it
  • +13
  • Vote: I do not like it

By fried-chicken, history, 3 years ago, In English

Now, it's 5:38 in China and I, who is chinese, who is therefore in China, still awake.

Back to 3 years ago, I, who is in my senior high, even felt guilty for sleeping after 00:00.

Back to 1 years ago, I could still go to sleep at maybe 1:00~2:00.

Back to 3 months ago, it's before 3:00.

Back to 1 months ago, before 4:00.

The day before yesterday, I stay up all ningt to review for final exam.

And, on yesterday, to my surprise, I'm not even sleepy at night and I eventually go to sleep at 6:00.

Today, it's nearly 6:00 again. The sun dazzling outside seems to remind me, saying "bro, it's not proper time for sleeping" to me.

Anyway, not stopping myself from 3:00, not stopping myself from 4:00, I have to stop myself from at least 6:00.

It's said by some research that people who is staying up late tend to be irrational and maybe that's why I wrote this weird blog post.

Here's mine. Say anything you want about staying up late.

Full text and comments »

  • Vote: I like it
  • +296
  • Vote: I do not like it

By fried-chicken, history, 3 years ago, In English

Since there isn't an existing one, I'm writing this blog for discussion of this wonderful contest, feel free to share any thoughts or solutions about this contest.

For me, how to solve the problem L?

Full text and comments »

  • Vote: I like it
  • +68
  • Vote: I do not like it

By fried-chicken, history, 4 years ago, In English

The position of 'GYM' button on the top box of codeforces seems change.

The position now:

While the position in my memory:

It make sense since more and more people start to use gym for practice and (from my point of view) the number of contests in gym are booming recently.

UPD:

After check some screenshots several years ago, it seems I got it wrong. The position of GYM button have never changed.

Maybe as a kind of drug, codeforces not only make me addicted, but also casue me some illusions :(

Anyway, sorry for bothering.

Full text and comments »

  • Vote: I like it
  • -35
  • Vote: I do not like it

By fried-chicken, history, 4 years ago, In English

Recently, I noted a funny thing about various views on codeforces’ problem.

In China, majority of competitive programmers described codeforces like “a good website for practicing your thinking” and “ advanced algorithms and data structure not necessarily required” (especially common in participants of Informatics Olympic).

At the same time, I saw some on codeforces said that codeforces’ problem have too much certain algorithms and data structure.

One possible reason for this may be that we(Chinese) consider the data structure vital and train mostly by some data structure problems .

So,what’s your point on codeforces’ problem? Further more, what do you think about the problems based on thinking and observation? What do you think about the problems based on a certain advanced algorithm or data structure?

Full text and comments »

  • Vote: I like it
  • +70
  • Vote: I do not like it