AtCoder Beginner Contest(ABC)の過去問から、その提出コードの解答例です。
AtCoderとは、コンテストを通じて、プログラミングやアルゴリズムを学習するサービスです。
atcoder.jp
プログラミングコンテストとは、「与えられた問題をいかに素早く、正確に」解くことができるかを競うものです。
「競技プログラミング」を略して、「競プロ」などと呼ばれています。
#B - Strings with the Same Length
atcoder.jp
僕が作成、提出したコードは、以下のとおりです。
/* AtCoder Problems in C #B - Strings with the Same Length https://atcoder.jp/contests/abc148/tasks/abc148_b:embed:cite 提出コードの解答例 https://neguse-atama.hatenablog.com */ #include<stdio.h> char s[110]; char t[110]; int main(void){ int a; scanf("%d",&a); scanf("%s %s",s,t); for(int loop=0;loop<a;loop++){ printf("%c%c",s[loop],t[loop]); } putchar('\n'); return 0; }
/* AtCoder Problems in C++ #B - Strings with the Same Length https://atcoder.jp/contests/abc148/tasks/abc148_b 提出コードの解答例 https://neguse-atama.hatenablog.com */ #include<stdio.h> char s[110]; char t[110]; int main(void){ int a; scanf("%d",&a); scanf("%s %s",s,t); for(int loop=0;loop<a;loop++){ printf("%c%c",s[loop],t[loop]); } putchar('\n'); return 0; }
AtCoder Beginner Contest(ABC)は、オンラインジャッジによるプログラミングコンテストです。
日本語と英語に対応していて、週末ごとに実施されているみたいです。
https://practice.contest.atcoder.jp/tutorial
アカウントを登録すれば、誰でも参加できます。