请教大神,这道题如何破?

qq_29448025 2017-07-30 10:38:03
...全文
281 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
cohye 2017-07-31
  • 打赏
  • 举报
回复
!doctype html>
<html class="no-js" lang="">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <title></title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="shortcut icon" href=".static/sealong.ico" />
        <!--根据《SLWPT》标准 此处可以继续添加CSS样式,除去modernizr-2.8.3.min.js,其他JS代码放到body中-->

        <link rel="stylesheet" href=".static/css/normalize.css">
        <link rel="stylesheet" href=".static/css/main.css">
        <script src="static/js/vendor/modernizr-2.8.3.min.js"></script>
    </head>
    <body>
        <!--[if lt IE 8]>
            <p class =“browserupgrade”>您使用的是<strong>过期的</ strong>浏览器。 请<a href="http://browsehappy.com/">升级浏览器</a>以改善您的体验。</ p>
        <![endif]-->

        <!-- 根据《SLWPT》标准在此处添加您的网站或应用内容 -->
        <p>Hello world! This is sealong web page template.</p>

        <script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
        <script>window.jQuery || document.write('<script src="static/js/vendor/jquery-1.12.0.min.js"><\/script>')</script>
        <script src="static/js/plugins.js"></script>
        <script src="static/js/main.js"></script>
		

        <!-- Google Analytics(分析):将UA-XXXXX-X更改为您的网站ID。
        <script>
            (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
            function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
            e=o.createElement(i);r=o.getElementsByTagName(i)[0];
            e.src='https://www.google-analytics.com/analytics.js';
            r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
            ga('create','UA-XXXXX-X','auto');ga('send','pageview');
        </script>
		-->
    </body>
</html>
你好sun悟空 2017-07-31
  • 打赏
  • 举报
回复
这道题可不可以理解为打印一个字节中所有的二进制数?
qq_34148608 2017-07-31
  • 打赏
  • 举报
回复
可以用二进制表示,每一位(0或1)表示一层的状态,最后转换成十进制存储,用的时候再转成二进制,面试的话应该考虑的就是这个吧,纯属猜测。
ps45221 2017-07-31
  • 打赏
  • 举报
回复
8个标记,无非就是8个状态位,可以看作每个标记的状态值为0和1两种 最简单的办法就是8层for循环,每层for循环0 - 1, 在最里面的for循环中,记录8个标记的状态, 等for循环全部结束时,所有的状态也就遍历完了,状态也记录了
qq_29448025 2017-07-31
  • 打赏
  • 举报
回复
引用 5 楼 cohye 的回复:
!doctype html>
<html class="no-js" lang="">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <title></title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="shortcut icon" href=".static/sealong.ico" />
        <!--根据《SLWPT》标准 此处可以继续添加CSS样式,除去modernizr-2.8.3.min.js,其他JS代码放到body中-->

        <link rel="stylesheet" href=".static/css/normalize.css">
        <link rel="stylesheet" href=".static/css/main.css">
        <script src="static/js/vendor/modernizr-2.8.3.min.js"></script>
    </head>
    <body>
        <!--[if lt IE 8]>
            <p class =“browserupgrade”>您使用的是<strong>过期的</ strong>浏览器。 请<a href="http://browsehappy.com/">升级浏览器</a>以改善您的体验。</ p>
        <![endif]-->

        <!-- 根据《SLWPT》标准在此处添加您的网站或应用内容 -->
        <p>Hello world! This is sealong web page template.</p>

        <script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
        <script>window.jQuery || document.write('<script src="static/js/vendor/jquery-1.12.0.min.js"><\/script>')</script>
        <script src="static/js/plugins.js"></script>
        <script src="static/js/main.js"></script>
		

        <!-- Google Analytics(分析):将UA-XXXXX-X更改为您的网站ID。
        <script>
            (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
            function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
            e=o.createElement(i);r=o.getElementsByTagName(i)[0];
            e.src='https://www.google-analytics.com/analytics.js';
            r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
            ga('create','UA-XXXXX-X','auto');ga('send','pageview');
        </script>
		-->
    </body>
</html>
wautsns 2017-07-30
  • 打赏
  • 举报
回复
8个标记?搞好凑够一个字节,用HashMap<Byte,XXX>可以尝试一下。

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧