Skip to content

Commit 953f289

Browse files
authored
Add tutorial for LOJ-1000 : Greeting on LightOJ (#1)
* Add english tutorial for LOJ-1000 * Add bangla tutorial for LOJ-1000 Problem Name: Greetings on LightOJ
1 parent 22f5094 commit 953f289

File tree

2 files changed

+110
-0
lines changed

2 files changed

+110
-0
lines changed

1000/bn.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# LOJ 1000 - Greeting on LightOJ
2+
3+
এটি লাইটওজে ভলিউমের সবচেয়ে সহজ সমস্যা। আপনাকে যা করতে হবে তা হ'ল প্রতিটি ক্ষেত্রে ইনপুট `a` এবং `b` এর যোগফল প্রিন্ট আউট করা।
4+
5+
তবে এর পরেও কিছু প্রব্লেম সল্ভার সঠিক আউটপুট ফর্ম্যাট অনুসরণ না করার কারণে সফল হতে পারে না।
6+
7+
1. আপনি প্রতিটি লাইনে নিউলাইন প্রিন্ট করেছেন তা নিশ্চিত করুন।
8+
2. সমস্যা বিবরণীতে দেয়া নমুনা আউটপুট এবং আপনার আউটপুট একই কি না তা নিশ্চিত করুন, কেস নম্বরটি একবার দেখুন।
9+
3. আপনি আউটপুটে সঠিক পরিমাণে ফাঁকা স্থান যোগ করেছেন তা নিশ্চিত করুন।
10+
11+
আপনি যদি এখনও এই সমস্যায় আটকে থাকেন তবে নীচের কোডগুলি দেখুন:
12+
13+
### C
14+
-----
15+
```c
16+
#include <stdio.h>
17+
18+
int main() {
19+
int cases, caseno;
20+
scanf("%d", &cases);
21+
for (caseno = 1; caseno <= cases; ++caseno) {
22+
int a, b;
23+
scanf("%d %d", &a, &b);
24+
printf("Case %d: %d\n", caseno, a + b);
25+
}
26+
return 0;
27+
}
28+
```
29+
30+
### Java
31+
-----
32+
```java
33+
package com.loj.volume;
34+
35+
import java.util.Scanner;
36+
37+
class GreetingsFromLoj {
38+
public static void main(String[] args) throws Exception {
39+
Scanner scanner = new Scanner(System.in);
40+
int cases = scanner.nextInt();
41+
for (int caseno = 1; caseno <= cases; ++caseno) {
42+
int a = scanner.nextInt();
43+
int b = scanner.nextInt();
44+
System.out.println("Case " + caseno + ": " + (a + b));
45+
}
46+
}
47+
}
48+
```
49+
50+
### Python 2
51+
-----
52+
```python
53+
for i in xrange(int(raw_input())):
54+
print "Case %i: %i" % (i + 1, sum(map(int, raw_input().split())))
55+
```

1000/en.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# LOJ 1000 - Greeting on LightOJ
2+
3+
It is the easiest problem on LightOJ volumes. All you have to do is print out the sum of input `a` and `b` on each case. There is nothing tricky about it.
4+
5+
But still some people can't get `Accepted` verdict because of not following the proper output format.
6+
7+
1. Make sure you have printed newline on each line
8+
2. Make sure you have same output as the sample output on the problem descriptin, take a look at case number.
9+
3. Make sure you have added right amount of spaces on the output.
10+
11+
If you are still stuck with this problem, check the codes below:
12+
13+
### C
14+
-----
15+
```c
16+
#include <stdio.h>
17+
18+
int main() {
19+
int cases, caseno;
20+
scanf("%d", &cases);
21+
for (caseno = 1; caseno <= cases; ++caseno) {
22+
int a, b;
23+
scanf("%d %d", &a, &b);
24+
printf("Case %d: %d\n", caseno, a + b);
25+
}
26+
return 0;
27+
}
28+
```
29+
30+
### Java
31+
-----
32+
```java
33+
package com.loj.volume;
34+
35+
import java.util.Scanner;
36+
37+
class GreetingsFromLoj {
38+
public static void main(String[] args) throws Exception {
39+
Scanner scanner = new Scanner(System.in);
40+
int cases = scanner.nextInt();
41+
for (int caseno = 1; caseno <= cases; ++caseno) {
42+
int a = scanner.nextInt();
43+
int b = scanner.nextInt();
44+
System.out.println("Case " + caseno + ": " + (a + b));
45+
}
46+
}
47+
}
48+
```
49+
50+
### Python 2
51+
-----
52+
```python
53+
for i in xrange(int(raw_input())):
54+
print "Case %i: %i" % (i + 1, sum(map(int, raw_input().split())))
55+
```

0 commit comments

Comments
 (0)