Submit solution
Points:
5
Time limit:
1.0s
Memory limit:
16M
Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig
Canadian Computing Competition: 2000 Stage 1, Junior #1
Write a program to print out a calendar for a particular month given the day on which the first of the month occurs together with the number of days in the month.
Your program should take as input an integer representing the day of the week on which the month begins (1
for Sunday, 2
for Monday, … , 7
for Saturday), and an integer which is the number of days in the month (between 28 and 31 inclusive). Your program should print the appropriate calendar for the month. You can assume that all input data will be valid.
DMOJ-specific note: None of the output lines should contain trailing whitespace. The last line must end with a newline.
Sample Input
3 30
Sample Output
Sun Mon Tue Wed Thr Fri Sat
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
Comments
Can you see other's responses on this website? I'm new
Yes, but only after solving the question
The whitespaces are killing me!
Is it possible to import Pandas to make a data frame?
We (much like the CCC and most online judges) do not support non-standard libraries unless the problem explicitly states otherwise.
This problem can be solved using simple loops and if statements, you are likely severely over complicating it.
HARDEST J1 EVER!!
Why is this a J1 question. It's so difficult. especially with an 11.0% success rate of 2020 July the 20th.
AC rates are not the best indicator of difficulty, as there are some IOI problems with higher AC rates (and implying this problem is harder than those is a bit of a stretch).
The low AC rate is a result of a mass rejudge that happened some time back, where we replaced the old checker with one that was far more strict about whitespacing (as that is the main difficulty of this problem), so many submissions that were previously deemed correct were rejudged as incorrect.
As for its difficulty relative to other J1s, this problem is (IMHO) harder than the majority of J1s from 2010-2020, but it does still fall under Waterloo's description of what a J1 should be.
tf u mean presentation error its exactly the output given
Reiterating the bolded line in the statement: DMOJ-specific note: None of the output lines should contain trailing whitespace. The last line must end with a newline.
This would include trailing newlines (i.e. unnecessary newlines at the end of input).
Ouff. Took a hit boys when doing this question and lost some brain cells. ;''(
this should be 5p
I'm beginning to understand why this J1 only has 10.3% AC...
EDIT: Completed but I had to kinda guess?
This comment is hidden due to too much negative feedback. Click here to view it.
stop bragging some people might think it's hard
Important tip if you get Presentation error: None of the output lines should contain trailing whitespace. The last line must end with a newline.
What does Presentation error mean?
EDIT:nvm i give up
you have to output exactly as the test case, meaning no extra spaces anywhere, and please don't hard code the answers
I did all the 2000 cccs, and all of them worked well. just this one. It works perfectly on my launcher, but it says WA here. Help?
harder one for a J1...
it took me two hours to do this
It took me almost an entire week
This comment is hidden due to too much negative feedback. Click here to view it.
My code works for the first 4 but not the last? helppp
Works on PEG judge for all cases but doesn't here. I suppose it is due to whitespace?
what's whitespace?
Thanks
This comment is hidden due to too much negative feedback. Click here to view it.
Don't prompt for input. The judge checks for exact output, and you shouldn't print unnecessary things.
My code works on my eclipse platform but gives be an IR for NumberFormat when I submit. Not sure what to do because I have no clue what the issue could be.
This should be worth more than 3 points, come on, at least 5?
It's only a J1 tho :|
If this is only a j1 and its only 3 points, why is this question worth 5 points?
Yeah. a J1 with an AC rate of 8.3% as of 2018 Halloween