1 solutions
-
0
C :
#include<stdio.h> int main() { int a,b,n; scanf("%d",&n); while(n--){ scanf("%d%d",&a,&b); printf("%d\n",a+b); } return 0; }C++ :
#include<iostream> using namespace std; int main(){ int n; cin>>n; while(n--){ int a,b; cin>>a>>b; cout<<a+b<<endl; } }Pascal :
var n,a,b,i:longint; begin readln(n); for i:=1 to n do begin readln(a,b); writeln(a+b); end; end.Java :
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int t=sc.nextInt(); while(t-->0) { int a=sc.nextInt(); int b=sc.nextInt(); System.out.println(a+b); } } }
- 1
Information
- ID
- 19004
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By