504. Base 7

Given an integer, return its base 7 string representation.

Example 1:

Input: 100
Output: "202"

Example 2:

Input: -7
Output: "-10"

Note: The input will be in range of [-1e7, 1e7].

思路:辗转相除法。

45. leetcode 504. Base 7的更多相关文章

  1. [LeetCode] 504. Base 7 基数七

    Given an integer, return its base 7 string representation. Example 1: Input: 100 Output: "202&q ...

  2. [LeetCode] 504. Base 7_Easy tag: Math

    Given an integer, return its base 7 string representation. Example 1: Input: 100 Output: "202&q ...

  3. LeetCode 504. Base 7 (C++)

    题目: Given an integer, return its base 7 string representation. Example 1: Input: 100 Output: "2 ...

  4. C#版 - Leetcode 504. 七进制数 - 题解

    C#版 - Leetcode 504. 七进制数 - 题解 Leetcode 504. Base 7 在线提交: https://leetcode.com/problems/base-7/ 题目描述 ...

  5. 【leetcode】504. Base 7

    problem 504. Base 7 solution: class Solution { public: string convertToBase7(int num) { ) "; st ...

  6. 【LeetCode】504. Base 7 解题报告(Java & Python)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 内建库 BigInteger类 逐位计算 倍数相加 ...

  7. [LeetCode&Python] Problem 504. Base 7

    Given an integer, return its base 7 string representation. Example 1: Input: 100 Output: "202&q ...

  8. 504. Base 7

    Given an integer, return its base 7 string representation. Example 1: Input: 100 Output: "202&q ...

  9. 504 Base 7 七进制数

    给定一个整数,将其转化为7进制,并以字符串形式输出.示例 1:输入: 100输出: "202" 示例 2:输入: -7输出: "-10"注意: 输入范围是 [- ...

随机推荐

  1. MFC简单绘制安卓机器人

    原始日期:2014-03-29 20:35 众所周知,google的安卓机器人形象十分经典,包括眼睛的位置,胳膊以及天线的位置都是有固定位置和比例的,而且是最恰当的,看起来最美.而微软基础类库MFC绘 ...

  2. Mac QQ 怎么清除聊天记录

    在 Mac 电脑上登录 QQ 以后,点击顶部菜单中“应用”下的“消息管理器”选项,如图所示

  3. [leetcode-599-Minimum Index Sum of Two Lists]

    Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite ...

  4. [leetcode-495-Teemo Attacking]

    In LLP world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned ...

  5. “HK”的日常之ARP断网攻击

    ARP断网攻击是什么?可以吃吗?如果可以吃它好吃吗? ARP断网攻击就是通过伪造IP地址和MAC地址实现ARP欺骗,能够在网络中产生大量的ARP通信量使网络阻塞,攻击者只要持续不断的发出伪造的ARP响 ...

  6. 如何使用LIBSVM,从安装到基本实例使用

    1.在eclipse上安装libsvm 下载libsvm压缩包解压到本地目录,下载地址http://www.csie.ntu.edu.tw/~cjlin/libsvm/index.html 如图: 2 ...

  7. JQuery实战——页面进度条效果

    今早逛阮一峰大神的博客 ECMAScript 6 入门 时候看到页面顶部有个进度条显示当前浏览的进度,如图: 顶部进度条会根据当前页面高度进行宽度调整,实战一番,视觉使用animated方法实现.下面 ...

  8. Java基础(3) -字符串

    字符串-String 1.定义&&初始化 使用双引号把字符括起来 String str = "test"; 2.字符串的提取-substring String a ...

  9. 基于Metronic的Bootstrap开发框架经验总结(15)-- 更新使用Metronic 4.75版本

    在基于Metronic的Bootstrap开发框架中,一直都希望整合较新.较好的前端技术,结合MVC的后端技术进行项目的开发,随着时间的推移,目前Metronic也更新到了4.75版本,因此着手对这个 ...

  10. JDBC01 利用JDBC连接数据库【不使用数据库连接池】

    目录: 1 什么是JDBC 2 JDBC主要接口 3 JDBC编程步骤[学渣版本] 5 JDBC编程步骤[学神版本] 6 JDBC编程步骤[学霸版本] 1 什么是JDBC JDBC是JAVA提供的一套 ...