ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1264. Workdays

How to make this on c++ ?
Posted by Nickolas 22 Dec 2014 21:31
Re: How to make this on c++ ?
Posted by Md. Shahedul Islam (Shahed) 8 Jun 2015 22:45
 we have N element array.
And we have (M+1) integers, as numaration starts form 0 to M.
so, (M+1) integers will be checked in every element of the array.
as, there's N elements in the array, so, final result is N*(M+1).  :)
------------------------------------
#include <iostream>
using namespace std;

int main()
{
    int n, m;

    cin >> n >> m;

    cout << n * (m + 1) << '\n';

    return 0;
}
---------------------------------------