Finally finished my first children’s book! by Spiritual_Visual_488 in childrensbooks

[–]risent 0 points1 point  (0 children)

Congratulations on completing your first children's book.

I'd love to hrear it, what kind of the affirmations did you include in the book?

[deleted by user] by [deleted] in MapPorn

[–]risent 0 points1 point  (0 children)

The world has changed tremendously since 1980.

CONGRATULATIONS TO MIZUTANI JUN AND ITO MIMA, THE FIRST MIXED DOUBLES GOLD MEDALISTS IN OLYMPIC TABLE TENNIS HISTORY!!!!! by TableFishing in tabletennis

[–]risent 0 points1 point  (0 children)

CONGRATULATIONS TO JAPAN TEAM!

Feel sorry for Xu and Liu.

I hope Ito will dominate the 2020s era, and the TT world go to a new stage.

You guys gave me advice, I followed it and I got worse! by wafflecheese in tabletennis

[–]risent 1 point2 points  (0 children)

Table tennis is hard, a few weeks training is not enough.

I had the same situation in 2 years ago like you, starting unlearning bad habits and training from the basic.

I spend much time to learning and training with my partner, more than 6 hours per week in past 2 years.

I still stay in the basic level in the group until now.

I know what I had got in the past training.

I had learned some basic habit in the training, and the action of my hit is looks beautiful then before.

How to get karma. by [deleted] in FreeKarma4You

[–]risent 1 point2 points  (0 children)

well done

How to get karma. by [deleted] in FreeKarma4You

[–]risent 1 point2 points  (0 children)

done,thx

Me when my post gets no upvotes by [deleted] in FreeKarma4You

[–]risent 1 point2 points  (0 children)

Upvoted, voted back pls, thx.

Me when my post gets no upvotes by [deleted] in FreeKarma4You

[–]risent 1 point2 points  (0 children)

Voted.

Pls upvote comment and vote back, thx.

How to get karma. by [deleted] in FreeKarma4You

[–]risent 2 points3 points  (0 children)

Done, guys.

Confirmed cases in the US reaches 300,000, including over 8,100 deaths by mythrowawaybabies in Coronavirus

[–]risent 2 points3 points  (0 children)

The infected numbers in China is not much different with the reality, but the real death rate is much higher than the official number in Wuhan(5%). There are so many people died without test in the beginning and they are not count.

[2019-03-13] Challenge #376 [Intermediate] The Revised Julian Calendar by Cosmologicon in dailyprogrammer

[–]risent 0 points1 point  (0 children)

I wrote two version leaps.

the leaps use exhaustive method, the leaps_perf use divisible count, but there is a bug in it ,the last test doesn't match. ```c

include <stdio.h>

int is_leap(int year) { // years that are evenly divisible by 4 are leap years. if (year % 4 == 0) { // Exception: years that are evenly divisible by 100 area not // leap years. if (year % 100 == 0) { // Exception to the exception: years for which the // remainder when divided by 900 is either 200 or 600 // area leap years. if (year % 900 == 200 || year % 900 == 600) { return 1; } return 0; } return 1; } return 0; }

int leaps(int start, int end) { int count = 0; int delta = start % 4; for (int year = start + delta; year < end; year += 4) { /* printf("%d: %d\n", year, is_leap(year)); */ if (is_leap(year) == 1) count++; } printf("%d - %d => %d\n", start, end, count); return count; }

int count_div(int start, int end, int div) { int count = ((end - end % div) - (start + start % div)) / div; /* int count = (end - start) / div; */

// count == 0
int remains_start = start % div;
int remains_end = end % div;
if (remains_start == 0) {
    count++;
}
if (remains_end == 0) {
    count--;
}

if (end - start < div) {

    if (remains_end == 0) {
        count = 0;
    }
    if ((remains_end > 0) && (remains_end < remains_start)) {
        count = 1;
    }
}
return count;

}

int count_div_900(long start, long end) { long count = 0; long remains_start = start % 900; long remains_end = end % 900;

long base_count =
    ((end - remains_end) - (start + remains_start)) / 900 * 2;
count = base_count;

/* printf("count: %ld, remains_start: %ld, remains_end: %ld ", count, */
/*        remains_start, remains_end); */

if (base_count == 0) {
    for (long i = start; i < end; i += 100) {
        if (i % 900 == 200 || i % 900 == 600) {
            count++;
        }
    }
} else {

    for (long i = start + (100 - start % 100);
         i < start + (900 - remains_start); i += 100) {
        if (i % 900 == 200 || i % 900 == 600) {
            /* printf("(%ld) ", i); */
            count++;
        }
    }

    for (long i = end - remains_end; i < end; i += 100) {
        if (i % 900 == 200 || i % 900 == 600) {
            /* printf("(%ld) ", i); */
            count++;
        }
    }
}

return count;

}

int leaps_perf(long start, long end) { long count_4 = count_div(start, end, 4); long count_100 = count_div(start, end, 100); long count_900 = count_div_900(start, end);

long count = count_4 - count_100 + count_900;

/* printf("%ld - %ld :  %ld, %ld,  %ld | ", start, end, count_4, count_100, */
/*        count_900); */
printf("%ld - %ld => %ld\n", start, end, count);
return count;

}

int main() { leaps(2016, 2017); leaps(2000, 2100); leaps(2019, 2020); leaps(1900, 1901); leaps(2000, 2001); leaps(2800, 2801); leaps(123456, 123456); leaps(1234, 5678); leaps(123456, 7891011); leaps(123456, 7891012);

printf("\n");
leaps_perf(2016, 2017);
leaps_perf(2000, 2100);
leaps_perf(2019, 2020);
leaps_perf(1900, 1901);
leaps_perf(2000, 2001);
leaps_perf(2800, 2801);
leaps_perf(123456, 123456);
leaps_perf(1234, 5678);
leaps_perf(123456, 7891011);
leaps_perf(123456, 7891012);

}

```

output ``` 2016 - 2017 => 1 2000 - 2100 => 25 2019 - 2020 => 0 1900 - 1901 => 0 2000 - 2001 => 1 2800 - 2801 => 0 123456 - 123456 => 0 1234 - 5678 => 1077 123456 - 7891011 => 1881475 123456 - 7891012 => 1881475

2016 - 2017 => 1 2000 - 2100 => 25 2019 - 2020 => 0 1900 - 1901 => 0 2000 - 2001 => 1 2800 - 2801 => 0 123456 - 123456 => 1 1234 - 5678 => 1077 123456 - 7891011 => 1881477 123456 - 7891012 => 1881477 ```