Coding Exercise – Timus Online Judge – 1264. Workdays – C++ solution


1264 Coding Exercise - Timus Online Judge - 1264. Workdays - C++ solution c / c++ code implementation math programming languages timus

This simple puzzle is from Timus Online Judge.

Despite a lengthy description, the solution is really simple. The number of lines is the number of the seconds he needs to write it. There are two variables, the second number N starts with index 0, and the first variable M starts with index 1, so the total number is M * (N + 1)

1
2
3
4
5
6
7
8
9
10
#include <iostream>
using namespace std;
 
int main()
{
    int n, m;
    cin >> n >> m;
    cout << n * (m + 1) << endl;
    return (0);
}
#include <iostream>
using namespace std;

int main()
{
    int n, m;
    cin >> n >> m;
    cout << n * (m + 1) << endl;
    return (0);
}

Believe your eyes, it is that simple with algorithm complexity tex_3be74cac013d6997340f7ab8973bbd70 Coding Exercise - Timus Online Judge - 1264. Workdays - C++ solution c / c++ code implementation math programming languages timus . This puzzle has a higher difficulty score than the Ural Steaks puzzle, which is a much more sophisticated problem. The difficulty of a problem is not necessarily related to how much code it takes to solve it. Rather, the point of problem solving is to map scenarios to programs that solve them. It is the proper understanding and the analysis of the puzzle that a lot of the difficulty (and most of the importance!) lies.

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
324 words
Last Post: Tutorial - 7 - C Programming in 6502 - Colour Setting for NES
Next Post: Why Absolute Value of INT_MAX and INT_MIN is different?

The Permanent URL is: Coding Exercise – Timus Online Judge – 1264. Workdays – C++ solution

One Response

  1. abdullah

Leave a Reply