Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tutorial for LOJ-1000 : Greeting on LightOJ #1

Merged
merged 2 commits into from
Nov 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions 1000/bn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# LOJ 1000 - Greeting on LightOJ

এটি লাইটওজে ভলিউমের সবচেয়ে সহজ সমস্যা। আপনাকে যা করতে হবে তা হ'ল প্রতিটি ক্ষেত্রে ইনপুট `a` এবং `b` এর যোগফল প্রিন্ট আউট করা।

তবে এর পরেও কিছু প্রব্লেম সল্ভার সঠিক আউটপুট ফর্ম্যাট অনুসরণ না করার কারণে সফল হতে পারে না।

1. আপনি প্রতিটি লাইনে নিউলাইন প্রিন্ট করেছেন তা নিশ্চিত করুন।
2. সমস্যা বিবরণীতে দেয়া নমুনা আউটপুট এবং আপনার আউটপুট একই কি না তা নিশ্চিত করুন, কেস নম্বরটি একবার দেখুন।
3. আপনি আউটপুটে সঠিক পরিমাণে ফাঁকা স্থান যোগ করেছেন তা নিশ্চিত করুন।

আপনি যদি এখনও এই সমস্যায় আটকে থাকেন তবে নীচের কোডগুলি দেখুন:

### C
-----
```c
#include <stdio.h>

int main() {
int cases, caseno;
scanf("%d", &cases);
for (caseno = 1; caseno <= cases; ++caseno) {
int a, b;
scanf("%d %d", &a, &b);
printf("Case %d: %d\n", caseno, a + b);
}
return 0;
}
```

### Java
-----
```java
package com.loj.volume;

import java.util.Scanner;

class GreetingsFromLoj {
public static void main(String[] args) throws Exception {
Scanner scanner = new Scanner(System.in);
int cases = scanner.nextInt();
for (int caseno = 1; caseno <= cases; ++caseno) {
int a = scanner.nextInt();
int b = scanner.nextInt();
System.out.println("Case " + caseno + ": " + (a + b));
}
}
}
```

### Python 2
-----
```python
for i in xrange(int(raw_input())):
print "Case %i: %i" % (i + 1, sum(map(int, raw_input().split())))
```
55 changes: 55 additions & 0 deletions 1000/en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# LOJ 1000 - Greeting on LightOJ

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.

But still some people can't get `Accepted` verdict because of not following the proper output format.

1. Make sure you have printed newline on each line
2. Make sure you have same output as the sample output on the problem descriptin, take a look at case number.
3. Make sure you have added right amount of spaces on the output.

If you are still stuck with this problem, check the codes below:

### C
-----
```c
#include <stdio.h>

int main() {
int cases, caseno;
scanf("%d", &cases);
for (caseno = 1; caseno <= cases; ++caseno) {
int a, b;
scanf("%d %d", &a, &b);
printf("Case %d: %d\n", caseno, a + b);
}
return 0;
}
```

### Java
-----
```java
package com.loj.volume;

import java.util.Scanner;

class GreetingsFromLoj {
public static void main(String[] args) throws Exception {
Scanner scanner = new Scanner(System.in);
int cases = scanner.nextInt();
for (int caseno = 1; caseno <= cases; ++caseno) {
int a = scanner.nextInt();
int b = scanner.nextInt();
System.out.println("Case " + caseno + ": " + (a + b));
}
}
}
```

### Python 2
-----
```python
for i in xrange(int(raw_input())):
print "Case %i: %i" % (i + 1, sum(map(int, raw_input().split())))
```