1 Star 0 Fork 0

JJustRight/ACM-ICPC-Algorithms

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Problem Description

Given a positive number up to 10 digits long, find the largest number that can be formed with the digits that's divisible by 3. If not number can be formed that is divisible by 3, return 0

Input: int Output int

Examples:

  • largest_div_by_three(0) -> 0
  • largest_div_by_three(24) -> 42
  • largest_div_by_three(319) -> 93
  • largest_div_by_three(113) -> 3
  • largest_div_by_three(111) -> 0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/jjustright/ACM-ICPC-Algorithms.git
git@gitee.com:jjustright/ACM-ICPC-Algorithms.git
jjustright
ACM-ICPC-Algorithms
ACM-ICPC-Algorithms
master

搜索帮助