为什么很多老板不愿招35岁到40岁的员工?

https://zhuanlan.zhihu.com/p/137601987

package com.example.helloworlddemo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 运行main spring启动
 * 测试hello接口
 * Terminal:
 * curl http://localhost:8080/hello
 * 返回hello Spring
 * curl http://localhost:8080/actuator/health
 * 返回spring健康状况
 */
@SpringBootApplication
@RestController
public class HelloworldDemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(HelloworldDemoApplication.class, args);
    }

    @RequestMapping("/hello")
    public String hello(){
        return "hello Spring";
    }
}

package com.example.helloworlddemo;

public class ConsecutiveDucks {

    public static void main(String[] args) {
        //N is: 2 ≤ N ≤ (2^31) -1 .
        boolean b = consecutiveDucks(19);
        System.out.println("result boolean :" + b);
    }

    public static boolean consecutiveDucks(int n) {
        // your code here
        boolean flag = false;
        int i = 1;
        System.out.println("i:" + i);
        //如果i小于数字N
        int base = 1;
        for(int x=1;;x++){
           base+=x;
            System.out.println("base:"+base);
            if(base==n){
                return true;
            }
            if(base>n){
                break;
            }
        }

//        while (i < n) {
//            i += (i + 1);
//            System.out.println("add i:" + i);
//            if(i==n){
//                return true;
//            }
//
//
//        }


        return flag;
    }
}

posted @ 2020-07-11 19:44  ukyo--夜王  阅读(155)  评论(0编辑  收藏  举报