Caramelio's blog

By Caramelio, 5 years ago, In English

Matryoshka Dolls This is the problem I am stuck on. I wrote the source code in C++, which is down below. It failed on the 2nd test.

#include<iostream>
using namespace std;

int main(){
    int s, x;
    cin >> s >> x;
    cout << (s-x)/x << endl;
}

If you have some time to spare, please help me. Thank you!!

Full text and comments »

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

By Caramelio, history, 5 years ago, In English

Should I not write questions here?
Should I not write answers here?
Would that become a problem? A big one?
I really don't know much about blogging, so could you tell me, please?
I'm really confused...

Full text and comments »

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

By Caramelio, history, 5 years ago, In English

Do you think there are problems in Codeforces that are unsolvable with some type of programming languages?

For example, Python 3. The problem is

Alice and Bob play different games. When Alice plays, she always wins exactly a points. When Bob plays, he always wins exactly b points. Today, after they finished playing, they noticed they had the same number of points. What is the smallest number this could be?

Input The first line contains two integers, a and b, separated by spaces, where a is the number of points Alice wins in one game and b is the number of points Bob wins in one game.

Output You should return the smallest possible number of points that Alice and Bob have, which should be an integer c.

Examples input : 2 3 output: 6

input : 4 6 output: 12

Note Constraints:

1 ≤ a ≤ 10, 000

1 ≤ b ≤ 10, 000

1 ≤ c ≤ 100, 000, 000

When I solved this with Python 3, it couldn't solve it within the limit time. (1 second) Do you think I should create a program with C++, or am I not trying hard enough?

Full text and comments »

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

By Caramelio, history, 5 years ago, In English

Do you remember the time when you solved your first problem? Do you remember the feeling when your algorithm was accepted? It was a feeling you can't describe with words, right? Or was it normal? Please tell me.

P.S. This is my first time blogging, so I don't know what to write here. Could you tell me, please?

Full text and comments »

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