本文主要是介绍华为算法精英赛(题1:判断输入天数为当年的第几天),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
比赛地址:https://bbs.huaweicloud.com/forum/thread-29407-1-1.html
>初级赛题:判断输入天数为当年的第几天
·题目介绍
输入一个日期,格式为xxxx-xx-xx,判断这一天为当年的第几天?
·示例
输入:2019-1-2
输出:2
/** * Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with* this work for additional information regarding copyright ownership.* The ASF licenses this file to You under the Apache License, Version 2.0* (the "License"); you may not use this file except in compliance with* the License. You may obtain a copy of the License at
这篇关于华为算法精英赛(题1:判断输入天数为当年的第几天)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!