Ad
Code
Diff
  • package kumite
    import "time"
    func CheckWorkHours(dateTime time.Time) bool { 
    return dateTime.Weekday() != time.Thursday && dateTime.Weekday() != time.Sunday && dateTime.Hour() >= 8 && dateTime.Hour() < 18 }
    • package kumite
    • import ( "time"; "math" )
    • func CheckWorkHours(dateTime time.Time) bool {
    • if math.Abs(float64(dateTime.Weekday()) - 3) == 3 { return false }
    • return 8 <= dateTime.Hour() && dateTime.Hour() < 18
    • }
    • import "time"
    • func CheckWorkHours(dateTime time.Time) bool {
    • return dateTime.Weekday() != time.Thursday && dateTime.Weekday() != time.Sunday && dateTime.Hour() >= 8 && dateTime.Hour() < 18 }
Code
Diff
  • public class Kumite {
      public static bool IsThree(int n) {
        while(n%10!=3&&n>0)n/=10;
        return n>0;
      }
    }
    • using System;
    • public class Kumite {
    • public static bool IsThree(int n) {
    • while(n%10!=3&&n>0)n/=10;
    • return n>0;
    • }
    • }
Code
Diff
  • package kumite
    import ( "time"; "math" )
    func CheckWorkHours(dateTime time.Time) bool {
      if math.Abs(float64(dateTime.Weekday()) - 3) == 3 { return false }
      return 8 <= dateTime.Hour() && dateTime.Hour() < 18
    }
    • package kumite
    • import "time"
    • import "math"
    • import ( "time"; "math" )
    • func CheckWorkHours(dateTime time.Time) bool {
    • if math.Abs(float64(dateTime.Weekday()) - 3) == 3 {
    • return false
    • }
    • hour := dateTime.Hour()
    • return 8 <= hour && hour < 18
    • if math.Abs(float64(dateTime.Weekday()) - 3) == 3 { return false }
    • return 8 <= dateTime.Hour() && dateTime.Hour() < 18
    • }