CPCEJC4-Editorial

PROBLEM LINK:

Practice

Author: Manish Motwani
Tester: Lovish Tater
Editorialist: Manish Motwani

DIFFICULTY:

CAKEWALK

PREREQUISITES:

Basic Mathematics, Arithmetic operators.

PROBLEM:

The Problem statement states that, there are two integer numbers to be taken as input and our task is to evaluate their sum.

QUICK EXPLANATION:

We have to take two integers as input and output their sum.

EXPLANATION:

We have to take two numbers of integer type as a input and output their sum.

SOLUTIONS:

Setter's Solution
#include <iostream>

using namespace std;

int main() {
// your code goes here
int a,b;
cin>>a>>b;
cout<<a+b;
return 0;
}

Tester's Solution

/* package codechef; // don’t place package name! */

import java.util.;
import java.lang.
;
import java.io.*;

/* Name of the class has to be “Main” only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Scanner sc = new Scanner(System.in);
int t2 = sc.nextInt();
int t1 = sc.nextInt();
int c = t1+t2;
System.out.println©;
}
}

Editorialist's Solution
#include<iostream>

using namespace std;

int main() {
// your code goes here
int a,b;
cin>>a>>b;
cout<<a+b;
return 0;
}