Skip to main content
jaaq's user avatar
jaaq's user avatar
jaaq's user avatar
jaaq
  • Member for 5 years, 9 months
  • Last seen more than 2 years ago
awarded
awarded
awarded
awarded
awarded
comment
1, 2, Fizz, 4, Buzz
It also works and comes out to 56 without the exec magic and the multiplied string, using a normal loop instead: for i in range(100):print i%3/2*'Fizz'+i%5/4*'Buzz'or-~i.
comment
"Hello, World!" in zero lines of code
Sooo, who's going to open an issue and link this post there?
comment
Output ISO8601 date string from seconds and nanoseconds
Oh, well, you may take the input as an integer, not necessarily a built-in integer, afaik the default IO rules don't specify whether you may pad your input/take an integer as a string with padded 0s. Open to suggestions here. What's common practice on leading 0s in integer inputs?
comment
Output ISO8601 date string from seconds and nanoseconds
The way the standard is now, only microseconds(6 digits) are mentioned in the standard. The microsecond digits are either 6 digits or 0 digits. See TC 4,5 and 6.
comment
Output ISO8601 date string from seconds and nanoseconds
@JdeBP Ooof I hadn't considered that beforehand TBH. According to this answer unix timestamps don't produce skipped leap seconds but the skipped second is a valid ISO8601 date. As far as I understand it, you may ingore leap seconds as they may be represented in a valid timestamp according to the standard.
comment
Output ISO8601 date string from seconds and nanoseconds
@Shaggy what do you mean by leading 0s? In which part of the output?
comment
Output ISO8601 date string from seconds and nanoseconds
Nice! If that's the case I'll add it to the header :)
revised
Loading…
revised
Loading…
comment
revised
Loading…
revised
Loading…
comment
Output ISO8601 date string from seconds and nanoseconds
I'll make a start with an example, though there probably still is some room for improvements.
Loading…
Loading…
1
2 3 4 5
7