{"id":4776,"date":"2022-02-06T09:32:17","date_gmt":"2022-02-06T00:32:17","guid":{"rendered":"https:\/\/suzutukiblog.com\/?p=4776"},"modified":"2022-10-08T00:42:56","modified_gmt":"2022-10-07T15:42:56","slug":"lv-upper","status":"publish","type":"post","link":"https:\/\/suzutukiblog.com\/index.php\/2022\/02\/06\/lv-upper\/","title":{"rendered":"PaizaLv\u30a2\u30c3\u30d7\u554f\u984c\u96c6(\u6a19\u6e96\u51fa\u529b)"},"content":{"rendered":"<h2>\u203b\u30b9\u30ad\u30eb\u30c1\u30a7\u30c3\u30af\u554f\u984c\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n\u898f\u7d04\u306b\u3088\u308a\u516c\u5f0f\u306e\u89e3\u7b54\u30b3\u30fc\u30c9\u305d\u306e\u307e\u307e\u306f\u3088\u308d\u3057\u304f\u306a\u3044\u306e\u3067\u3001<br \/>\n\u30aa\u30ea\u30b8\u30ca\u30eb\u306e\u30b3\u30fc\u30c9\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/h2>\n<h2><a href=\"https:\/\/suzutukiblog.com\/index.php\/2022\/09\/21\/paiza_lvup\/\">\u8a73\u3057\u304f\u306f\u30b3\u30c1\u30e9<\/a><\/h2>\n<h2>\u306a\u308b\u3079\u304f\u308f\u304b\u308a\u3084\u3059\u3044\u89e3\u8aac\u3092\u4ed8\u3051\u307e\u3057\u305f\u3002<\/h2>\n<h2>\u554f\u984c1<\/h2>\n<p>\u5b9f\u6570 N\u3001\u81ea\u7136\u6570 M \u304c\u5165\u529b\u3055\u308c\u307e\u3059\u3002N \u3092\u4e38\u3081\u3066\u5c0f\u6570\u7b2c M \u4f4d\u307e\u3067\u51fa\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u307e\u305f\u3001N \u306e\u5c0f\u6570\u90e8\u304c\u5c0f\u6570\u7b2c M \u4f4d\u306b\u6e80\u305f\u306a\u3044\u5834\u5408\u306f 0 \u3067\u57cb\u3081\u3066\u51fa\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u306a\u304a\u3001\u5c0f\u6570\u7b2c M \u4f4d\u304c 5 \u306b\u306a\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n\u81ea\u7136\u306a\u4e38\u3081\u51e6\u7406\u3092\u884c\u3063\u3066\u51fa\u529b\u3059\u308b\u3068\u6b63\u89e3\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>\u5165\u529b\u4f8b\r\n0.813 4\r\n\r\n\u51fa\u529b\u4f8b4\r\n0.8130<\/pre>\n<h3>\u89e3\u7b54<\/h3>\n<pre>n,m = gets.split(' ').map(&amp;:to_f)\r\n# \u5c0f\u6570\u70b9\u4ee5\u4e0b\u306e\u6841\u6570\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\r\nprintf(\"%.#{m.to_i}f\", n)<\/pre>\n<h3 class=\"a-works-heading1\">\u554f\u984c2 \u8907\u6570\u306e\u5b9f\u6570\u3092\u51fa\u529b (paiza\u30e9\u30f3\u30af C \u76f8\u5f53)<\/h3>\n<p>\u81ea\u7136\u6570 Q \u304c\u4e0e\u3048\u3089\u308c\u307e\u3059\u3002Q \u56de\u4ee5\u4e0b\u306e\u554f\u984c\u306b\u7b54\u3048\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u5b9f\u6570 N\u3001\u81ea\u7136\u6570 M \u304c\u5165\u529b\u3055\u308c\u307e\u3059\u3002N \u3092\u4e38\u3081\u3066\u5c0f\u6570\u7b2c M \u4f4d\u307e\u3067\u51fa\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305f\u3001N \u306e\u5c0f\u6570\u90e8\u304c\u5c0f\u6570\u7b2c M \u4f4d\u306b\u6e80\u305f\u306a\u3044\u5834\u5408\u306f 0 \u3067\u57cb\u3081\u3066\u51fa\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u306a\u304a\u3001\u5c0f\u6570\u7b2c M \u4f4d\u304c 5 \u306b\u306a\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n\u81ea\u7136\u306a\u4e38\u3081\u51e6\u7406\u3092\u884c\u3063\u3066\u51fa\u529b\u3059\u308b\u3068\u6b63\u89e3\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u5165\u529b\u4f8b1<\/h2>\n<pre>4\r\n0.813 1\r\n0.813 2\r\n0.813 3\r\n0.813 4<\/pre>\n<h2>\u51fa\u529b\u4f8b1<\/h2>\n<div class=\"box1\">\n<dl class=\"txt2\">\n<dt>\n<pre>0.8\r\n0.81\r\n0.813\r\n0.8130<\/pre>\n<\/dt>\n<\/dl>\n<\/div>\n<h3>\u554f\u984c3 \u76f4\u89d2\u4e09\u89d2\u5f62\u306e\u51fa\u529b<\/h3>\n<p>\u81ea\u7136\u6570 N \u304c\u4e0e\u3048\u3089\u308c\u307e\u3059\u30021 \u2266 i \u2266 N \u306e\u5404 i \u306b\u3064\u3044\u3066\u3001i \u884c\u76ee\u306b\u306f\u4ee5\u4e0b\u306e\u6570\u5217\u3092\u51fa\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002* 1 \u4ee5\u4e0a i \u4ee5\u4e0b\u306e\u6570\u5024\u3092\u3059\u3079\u3066\u3001\u534a\u89d2\u30b9\u30da\u30fc\u30b9\u533a\u5207\u308a\u3067\u51fa\u529b\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n<dl class=\"txt2\">\n<dt>\u5165\u529b\u4f8b1<\/dt>\n<dt>\n<pre><span style=\"font-size: 0.857143rem;\">4<\/span><\/pre>\n<p>\u51fa\u529b\u4f8b1<\/dt>\n<\/dl>\n<div class=\"box1\">\n<dl class=\"txt2\">\n<dt>\n<pre>1\r\n1 2\r\n1 2 3\r\n1 2 3 4<\/pre>\n<\/dt>\n<\/dl>\n<\/div>\n<h3>\u89e3\u7b54<\/h3>\n<ol>\n<li>\n<h2>\u5165\u529bN\u3092\u4ee3\u5165<\/h2>\n<\/li>\n<li>\n<h2>\u914d\u5217[1, 2, 3, 4]\u3092\u4f5c\u308b<\/h2>\n<\/li>\n<li>\n<h2>times\u3067\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u3059\u308b<\/h2>\n<\/li>\n<li>\n<h2>a.take\u3092\u4f7f\u3046\u3053\u3068\u3067\u914d\u5217\u3092i\u305a\u3064\u53d6\u308a\u51fa\u3057\u3066\u534a\u89d2\u30b9\u30da\u30fc\u30b9\u3092\u9593\u306b\u5165\u308c\u3066\u51fa\u529b\u3059\u308b<\/h2>\n<\/li>\n<\/ol>\n<pre>n = gets.to_i\r\na = *(1..n)\r\n1..n.times do |i|\r\n  puts a.take(a[i]).join(' ')\r\nend<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u554f\u984c4 \u3059\u3079\u3066\u306e\u884c\u306e\u9577\u3055\u304c\u4e0d\u5b9a\u306a 2 \u6b21\u5143\u914d\u5217\u306e\u51fa\u529b<\/h3>\n<p>\u81ea\u7136\u6570N\u3068N\u500b\u306e\u8981\u7d20\u306e\u6570\u5217M\u304c\u4e0e\u3048\u3089\u308c\u307e\u3059\u3002<br \/>\n1 \u2266 i \u2266 N \u306e\u5404 i \u306b\u3064\u3044\u3066\u3001i \u884c\u76ee\u306b\u306f\u4ee5\u4e0b\u306e\u6570\u5217\u3092\u51fa\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n1 \u4ee5\u4e0a M_i \u4ee5\u4e0b\u306e\u3059\u3079\u3066\u306e\u81ea\u7136\u6570\u3092\u6607\u9806\u3001\u534a\u89d2\u30b9\u30da\u30fc\u30b9\u533a\u5207\u308a\u3067\u51fa\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u5165\u529b\u4f8b1<\/h2>\n<pre>4\r\n2 4 3 1<\/pre>\n<h2>\u51fa\u529b\u4f8b1<\/h2>\n<pre>1 2\r\n1 2 3 4\r\n1 2 3\r\n1<\/pre>\n<h2>\u5165\u529b\u4f8b2<\/h2>\n<pre>1\r\n1<\/pre>\n<h2>\u51fa\u529b\u4f8b2<\/h2>\n<pre>1<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u89e3\u7b54\u00a0 \u5165\u529b\u4f8b1\u3067\u89e3\u8aac<\/h3>\n<ol>\n<li>\n<h2>\u5165\u529bN\u3092\u53d7\u3051\u53d6\u308b<\/h2>\n<\/li>\n<li>\n<h2>\u6570\u5217M\u3092\u53d7\u3051\u53d6\u308b<\/h2>\n<\/li>\n<li>\n<h2>N\u56de\u7e70\u308a\u8fd4\u3059<\/h2>\n<\/li>\n<li>\n<h2>m\u306e\u914d\u5217\u306e\u6570\u5b57\u22121\u56de\u7e70\u308a\u8fd4\u3057(m[0]\u306e\u3068\u304d\u306f2\u22121\u30671\u56de)\u30011\u304b\u3089\u521d\u3081\u3066<\/h2>\n<\/li>\n<li>\n<h2>\u7e70\u308a\u8fd4\u3057\u304c\u7d42\u308f\u3063\u305f\u3089\u3001m\u306e\u914d\u5217\u3092\u52a0\u3048\u308b1 2<\/h2>\n<\/li>\n<li>\n<h2>2\u56de\u76ee\u306f(m[1]\u306a\u306e\u30674\u22121\u30673\u56de\u7e70\u308a\u8fd4\u3057)1 2 3\u307e\u3067\u3084\u3063\u305f\u3089<\/h2>\n<\/li>\n<li>\n<h2>puts m[i]\u30671 2 3 4\u304c\u51fa\u529b\u3055\u308c\u3066<\/h2>\n<\/li>\n<li>\n<h2>\u4ee5\u4e0b\u7e70\u308a\u8fd4\u3057\u3066\u3044\u304f<\/h2>\n<\/li>\n<\/ol>\n<pre>n = gets.to_i\r\nm = gets.split(' ').map(&amp;:to_i)\r\nn.times do |i|\r\n# \u3053\u3053\u3067\u5148\u306b1,2,3,\u3068\u3084\u3063\u3066\u304b\u3089\r\n  (m[i]-1).times { |j| print \"#{j +1 } \"}\r\n# \u6700\u5f8c\u306bm\u306e\u914d\u5217\u3092\u8db3\u3059\r\n  puts m[i]\r\nend<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u203b\u30b9\u30ad\u30eb\u30c1\u30a7\u30c3\u30af\u554f\u984c\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u898f\u7d04\u306b\u3088\u308a\u516c\u5f0f\u306e\u89e3\u7b54\u30b3\u30fc\u30c9\u305d\u306e\u307e\u307e\u306f\u3088\u308d\u3057\u304f\u306a\u3044\u306e\u3067\u3001 \u30aa\u30ea\u30b8\u30ca\u30eb\u306e\u30b3\u30fc\u30c9\u306b\u3057\u3066\u3044\u307e\u3059\u3002 \u8a73\u3057\u304f\u306f\u30b3\u30c1\u30e9 \u306a\u308b\u3079\u304f\u308f\u304b\u308a\u3084\u3059\u3044\u89e3\u8aac\u3092\u4ed8\u3051\u307e\u3057\u305f\u3002 \u554f\u984c1 \u5b9f\u6570 N\u3001\u81ea\u7136\u6570 M \u304c\u5165\u529b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[33,27],"tags":[],"class_list":["post-4776","post","type-post","status-publish","format-standard","hentry","category-lv-up","category-programming-note"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/posts\/4776","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/comments?post=4776"}],"version-history":[{"count":5,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/posts\/4776\/revisions"}],"predecessor-version":[{"id":6038,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/posts\/4776\/revisions\/6038"}],"wp:attachment":[{"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/media?parent=4776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/categories?post=4776"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/suzutukiblog.com\/index.php\/wp-json\/wp\/v2\/tags?post=4776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}