Skip to content

Commit

Permalink
Improve input/output files
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Nov 20, 2024
1 parent c65f00a commit e14cd7f
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 17 deletions.
34 changes: 17 additions & 17 deletions solutions/beecrowd/1052/1052.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
#include <string>

int main() {
char m[12][10]
= {"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"};
std::string m[12] = {
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
};
std::int16_t n;

scanf("%d", &n);
for (std::string::size_type i = 0; i < strlen(m[n - 1]); i++) {
printf("%c", m[n - 1][i]);
while (scanf("%d", &n) != EOF) {
printf("%s\n", m[n - 1].c_str());
}
printf("\n");

return 0;
}
11 changes: 11 additions & 0 deletions solutions/beecrowd/1052/in.txt
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
1
2
3
4
5
6
7
8
9
10
11
12
11 changes: 11 additions & 0 deletions solutions/beecrowd/1052/out.txt
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
January
February
March
April
May
June
July
August
September
October
November
December

0 comments on commit e14cd7f

Please sign in to comment.