4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Javaで画像をアスキーアートに変換してみた

Last updated at Posted at 2025-06-26

このプログラムを書こうとした理由

2ちゃんねるを見ているとアスキーアート職人がいてその技術力に圧倒することがよくある。
自分はアスキーアートなんて作ったことないのでjavaでアスキーアートを出力するプログラムを作ってみました。

今回は画像のピクセルごとの明るさを取得して明るさに応じた記号を出力することによってアスキーアートを作る形式をしています。

早速ソースコードどーん

明るさによって出力を変えるif文を改造したらもっと面白いアートが作れますよ!
出力するテキストファイルを指定したらそこに書き込まれます。

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

import javax.imageio.ImageIO;


public class img {
	public static void main(String[]args) throws IOException{
		BufferedImage bufferedImage  = ImageIO.read(new File("画像のファイルパス"));
        
		FileWriter fw = new FileWriter(new File("出力するテキストファイルのパス"));
		
		for(int i = 0; i < bufferedImage.getHeight();i = i + 2) {//縦に伸びちゃうので縦は1つ飛ばし
			for(int j = 0; j < bufferedImage.getWidth();j++) {
				int rgb = bufferedImage.getRGB(j, i);//getRGBでカラーコードを10進数にしたやつが取得できる
                
				int red = (rgb >> 16) & 0xff;
				int gleen = (rgb >> 8) & 0xff;
				int blue = (rgb) & 0xff;
				
				double Y = red*0.299 + gleen*0.587 + blue*0.114;//RGB値から明るさを取得

                //明るさによって出力する記号を変える
				if(Y >= 200) {
					fw.write(".");
				}else if (Y >= 180){
					fw.write("^");
				}else if(Y >= 170){
					fw.write("*");
				}else {
					fw.write("#");
				}
			}
			fw.write("\n");
		}
		
	}
}

出力結果

うp主実はイラスト描けるので自分で描いたイラストを入力してアスキーアートを作ってみました。
アイコンになっている女の子(オリキャラ)のイラストをプログラムに入力するとこんな結果が返ってきます
image.png

白黒画像に見えますが、よく見てみると記号がびっしり!
image.png

おまけ

最近書いたイラストをアスキーアートにしてみました
メモ帳に張り付けて文字を小さくしたら何かが見えてくるはず

..................................................................................................................................................................................................................................................................................................................................................................................................
..................................................................................................................................................................................................................................................................................................................................................................................................
...........................................................................................................................................................................................................................................................................^...........................^^^........................................................................................
................................................................................................................................................................................................................................................................^.................................................^^..............................................................................
.........................................................................................................................................................................................................................................................^..............................................................^^........................................................................
....................................................................................................................................................................................................................................................^........................................................................^....................................................................
................................................................................................................................................................................................................................................^................................................................................^................................................................
............................................................................................................................................................................................................................................^.......................................................................................^.............................................................
.........................................................................................................................................................................................................................................^.............................................................................................^..........................................................
.........................................................................................................................................................................................................................................................................................................................................^........................................................
....................................................................................................................................................................................................................................^......................................................................................................^......................................................
..................................................................................................................................................................................................................................................................................................................................................................................................
...............................................................................................................................................................................................................................^..............................................................................................................^...................................................
.............................................................................................................................................................................................................................^......................................................................^..........................................^..................................................
................................................................................................................................................................................................................................................................................................^#^...^#...^^^..................................^.................................................
..........................................................................................................................................................................................................................^....................................................................#^.......##^...^*.................................^................................................
........................................................................................................................................................................................................................^.....................................................................^^........^......*..................................................................................
......................................................................................................................................................................................................................^.......................................................................*^...............#..................................^...............................................
.....................................................................................................................................................................................................................^........................................................................*^.............^#....................................^..............................................
...................................................................................................................................................................................................................^...........................................................................#............^#.....................................^..............................................
..................................................................................................................................................................................................................^............................................................................^*.........^#.......................................^..............................................
.................................................................................................................................................................................................................^...............................................................................^.......^........................................................................................
................................................................................................................................................................................................................^.............................................................................................^*#.................................................................................
...............................................................................................................................................................................^*#^........................................................................................................................^#...*.................................................................................
.............................................................*.^*...^......................................................................................................^^^*^^^#...........................^...........................................^^^^**^^^^......^^^^^^^^^.......................#.....^.................................................................................
............................................................^^^^^*#....^................................................................................................^^..**^^^^^#.........................^......................................^**^.............................^*^................*^......*.................................................................................
............................................................#^^^^^^**.....*..........................................................................................^^...^#^^^^^^^#^.......................^...................................**^......................................^*^...........#^.......^..................................^..............................................
...........................................................*^^^^^^^^^#^.....^^.....................................................................................*.....#*^^^^^^^^^#.......................................................^#^..............................................*^.......#........^...................................^..............................................
..........................................................^*^^^^^^^^^^*#......^^................................................................................^^......#^^^^^^^^^^^#^.....................^.............................*#....................................................^*....#^........^..................................^...............................................
..........................................................#^^^^^^^^^^^^^#*......*^............................................................................*.......^#^^^^^^^^^^^^^#.................................................#^........^###............................................**.^#.........*..................................^...............................................
.........................................................^#^^^^^^^^^^^^^^*#.......*^.......................................................................^^........##^^^^^^^^^^^^^^#^...................^...........................^^.........####^.............................................##^.........#.................................^................................................
.........................................................#^^^^^^^^^^^^^^^^^#........#....................................................................^^.........#*^^^^^^^^^^^^^^^*#...................^.............................^#.........^..............................................^##..........#..................................................................................
........................................................^#^^^^^^^^^^^^^^^^^^#*.......*^................................................................*^..........#^^^^^^^^^^^^^^^^^^#....................................................**...................................................^#...#.........#................................^.................................................
........................................................#^^^^^^^^^^^^^^^^^^^^##........*.............................................................*^..........^#^^^^***^^^^^^^^^^^^#^......................................................**............................................^**^......#^.......*...............................^..................................................
.......................................................^#^^^^^^^^^^^^^^^^^^^^^##........#..........................................................*^...........^#^........^^^^^^^^^^^#*.........................................................^**^................................^^^**^............^#.....^^..............................^...................................................
.......................................................#^^^^^^^^^^^^^^^^^^^^^^^##........*.......................................................*^............^*.........^^^^^^^^^^^^*#..................^...........................................^^^^^^^^^^^^^^^^^^^^^^***^^^^^.....................#....*..............................^....................................................
.......................................................#^^^^^^^^#^^.............^#........^....................................................*^.............^*................*^^^^^^#..................^................................................................................................#..#.............................^.....................................................
......................................................#*^^^^^^^^*.................#........^^....................^^^^^^^^^^..................^^...............#.................*^^^^^^#.....................................................................................................................^#............................^......................................................
......................................................#^^^^^^^^^#.................^#.........^.......^##*^^^.....................^**####*^.^*................#.................^^^^^^^^#...................^.............................................................................................................................^........................................................
.....................................................^#^^^^^**^^^..................^#........^####^^.......................................^^####^..........*^................^^^^^^^^^#................................................................................................................................................^.........................................................
.....................................................#^^^^^^........................**....^##^.....................................................^##*^....*.................^^^^^^^^^#....................^.........................................................................................................................^...........................................................
.....................................................#^^^^^..........................###^...............................................................^*##^.....................*^^^*#.....................^......................................................................................................................^.............................................................
....................................................*#^^^^.......................^##^........................................................................*##^.................#^^^#*......................^...................................................................................................................^...............................................................
....................................................#^^*#....................^##^...............................................................................^*^..............^^^^^#^.......................^...............................................................................................................^..................................................................
....................................................#^#...................^##......................................................................................*#^...........*^^^^#.........................^...........................................................................................................^.....................................................................
...................................................*#^#................^#*.................................................................................^..........#*........#^^^^*#..........................^.......................................................................................................^........................................................................
...................................................#*^^^............^##.......................^.............................................................*...........**.....^*^^^^#^............................^..................................................................................................^...........................................................................
...................................................#^^^*..........##^.........................^.............................................................*.............^#...^^^^^^#...............................^............................................................................................................................................................................
..................................................^#^^^*.......^#*............................*.............................................^...............^*..............^##^^^^^#^.................................^......................................................................................^...................................................................................
..................................................*#^^^*^.....#^..............................*.............................................*................#................^#*^^**....................................^........................................................................................................................................................................
..................................................#^^^^^^...#^................................^.............................................^................*^.................^#*#............................^...^........^.......................................................................^............................................................................................
..................................................#^^^^^^.#^...................................^.............................................^...............^*...................*#..........................^.......^.........^.................................................................................................................................................................
..................................................#^^^^^##.....................................*.............................................*................#.....................#^.......................^.........^................................................................^^........................................................................................................
..................................................#^^^##..................^....................#.............................................*................#......................^#......................^.........^......................^^......................^^..........................................................................................................................
..................................................#^*#^...................^....................*..............................................^...............##.......................#^....................^........^...........................................................................................................................................................................
..................................................*##.....................^.....................^.............................................*...............*^#.......................^#..........^..^.......^.....^............................................................................................................................................................................
.................................................*#^.....................^......................#.............................................^^..............*^.^^.......................#..............^........^^..............................................................................................................................................................................
................................................^#.......................*......................#^.............................................*..............^*..^*.......................**......^.....^........................................................................................................................................................................................
...............................................*#........................#.....................#^*.............................................^..............^*....#.......................^#......^...^.........................................................................................................................................................................................
..............................................#^.........................#....................*^.*^......................................^......*.............^#.....#^.......................#...................................................................................................................................................................................................
.............................................#^.......^..................#...................^*...*.......................................^.....^*.............#......^*.......................#..................................................................................................................................................................................................
............................................#^...........................#..................^#.....*.......................................^.^...#^............#........#.......................#.................................................................................................................................................................................................
...........................................#^........^...................#.................^#......^^......................................^^^^^.^#............#.........#.......................#................................................................................................................................................................................................
..........................................**.........*..................^#^...............^#........*^.......................................*^^^.##...........#..........#^......................#...............................................................................................................................................................................................
.........................................^#..........#..................^#^..............^#..........^^.........^....^........................#*^^*#*.........^*...........#^......................#...................................................................................................................^^.........................................................................
.........................................#...........*..................^#^.............**............^*........^.......^.....................###^^#^#........*^............**......................#...................................................................^.............................................^^..........................................................................
........................................#^...........^..................^#^............#^...............#.......*..........^..................#.^#*^#.#.......#..............^*......................#..................................................................*..^^^^.......^^^**............#......^.......^...........................................................................
.......................................^#...........^^..................^*^.........^^#..................**.....*.............^^..............*...^#*^..#.....*...............^#.....................^^...........................................................^.....^..................^..........^....^.........^............................................................................
.......................................#............^^..................^#^^.......^##.....................*^...*................^^..........*......*#....^..*.................^*.....................#.................................................................^.......^...........................*............^........................................................................
.......................................#............*^..................^#^^.....^*#*........................^^.^...................^*^......#...............*..................^*.....................#.............................................................^^^#^^^...............................^..........^^*#^.......................................................................
......................................*^............*^..................^#^^...^^##.............................#*.......................^^^#^...................................*#......^.............^^..........................................................^.........^..........^.............................^^..........................................................................
......................................#.............*^..................^#^^..^*#^..........................................................^.....................................##......^.............*..........................................................*...^.....^....................................................................................................................
......................................*.............**...................#^^^*##..............................................................................^....................#^.....^#............^............................................................^............................................................................................................................
......................................*.............^*...................#*^##................................................................................*^...................^#......*#............*........................................................................................................................................................................................
.....................................^*.............^#...................#*#^............................^^...................................................^*....................##.....^*#...........*........................................................................................................................................................................................
.....................................^^.............^#...................##..............................^*....................................................*....................##......^*#^.........#........................................................................................................................................................................................
.....................................*...............#...................#^...............................#....................................................*^...................*#*......^#^*........#........................................................................................................................................................................................
.....................................*...............#...................^*...............................#....................................................^^...................^##......^#..*^......#........................................................................................................................................................................................
.....................................#...............#....................#...............................#.....................................................*....................#*^......#....*.....*........................................................................................................................................................................................
.....................................#...............#^...................#^..............................#.....................................................*....................#**......#......^^...........................................................................................................................................................................................
.....................................#...............**...................**..............................*^....................................................*....................#*#......#.........^.........................................................................................................................................................................................
.....................................#...............^#....................#..............................^^....................................................*^...................#*#......#...................................................................................................................................................................................................
.....................................#^...............#....................*^.............................^*....................................................^*...................#*#*.....#...................................................................................................................................................................................................
.....................................*^...............#^....................#..............................#.....................................................^...................#**#.....*^..................................................................................................................................................................................................
.....................................^*...............**....................*^.............................#........................................................................^#^^#......*..................................................................................................................................................................................................
.....................................^*................#.....................#......................................................................................................*#^^#^.....*..................................................................................................................................................................................................
......................................#................#^....................^*.....................................................................................................##^^##......*.................................................................................................................................................................................................
......................................#................^*.....................#^......................................................................................................##*#.......*................................................................................................................................................................................................
......................................#.................#......................#.......................................................................................................*##.......^^...............................................................................................................................................................................................
......................................*^................^*......................#.......................................................................................................##........#...............................................................................................................................................................................................
......................................^*.................#......................^*......................................................................................................#^.........*..............................................................................................................................................................................................
.......................................#.................^#......................*^.....................................................................................................#***#*^....#..............................................................................................................................................................................................
.......................................#..................*^......................*^..................................................................................................##^......*#..^*.............................................................................................................................................................................................
.......................................^*..................#.......................*^....................................................^^^......................................^#*...........^#..#.............................................................................................................................................................................................
........................................#...................#.......................*^.................................................^.....^..................................#^...............*..*.............................................................................................................................................................................................
........................................*^..................^#......*................^*......................................................................................#*..................#..^^............................................................................................................................................................................................
........................................^*...................^*......*#................#..................................................................................**....................^*..^^............................................................................................................................................................................................
.........................................#....................^^.......##^..............#..............................................................................^#......................**...^*............................................................................................................................................................................................
.........................................^.....................^^.......^#*^.............^^.........................................................................^#^.......................##....^*............................................................................................................................................................................................
.........................................^.......................*........##*^^............*......................................................................#^........................##^^....^*............................................................................................................................................................................................
.........................................^.......................^#.......*^##*^^^..........^^.................................................................^#........................^#*^^^^....^^............................................................................................................................................................................................
.........................................*............^^..........^#.......#^^###^^^^.........^..............................................................#^........................##^^^^^^^....#^............................................................................................................................................................................................
.........................................*............^^^..........^#*.....**^^^*##*^^^^^.......^.........................................................**........................*##*^^^^^^^^....#.............................................................................................................................................................................................
.........................................#.............^^^.........^^*#.....*^^^^^^*###*^^^^^^^..^^....................................................##^.......................^##*##^^^^^^^^^...^#.............................................................................................................................................................................................
.........................................#^............^^^^.........^^^*^...^^^^^^^^^^*####**^^^^^^*............................................^*####*.#......................###^^*##^^^^^^^^^...#^.............................................................................................................................................................................................
.........................................#^............^^^^^........^^^^^^..^^^^^^^^^^^^^^^#############*^^..........................^*###***^*^*##*.....#...................##*^^^^###^^^^^^^^^..#^..............................................................................................................................................................................................
.........................................#*............^^^^^^........^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*****###########****^^^^........###*#^.........#^..............*#*^^^^^^^###^^^^^^^^...*...............................................................................................................................................................................................
.........................................*#^...........^^^^^^^........^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*##^^^^^##^...............^##^###^............#..........*##^^^^^^^^^*##*^^^^^^^^..#................................................................................................................................................................................................
.........................................^#^............^^^^^^^.......^^^^^^**^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#######^^^^^^##............#*^^^*#...............^#.....*##..#*^^^^^^^^#***^^^^^^^^.*.................................................................................................................................................................................................
..........................................#^^...........^^^^^^^^^......^^^^^#^#*^^^^^^^^^^^^^^^^^^^^^^^^^^##^......###^....^#^.......^#...^##...................###^.^#..#*^^^^^^^^#.*#^^^^^^^.^^.................................................................................................................................................................................................
..........................................#*^............^^^^^^^^^......^^^^*#.^#*^^^^^^^^^^^^^^^^^^^^^*##............##^.....#^....^#....*#.......................*#*...**^^^^^^^##.*#^^^^^^^.*..................................................................................................................................................................................................
..........................................##^^....**.....^^^^^^^^^^^.....^^^^#^..##^^^^^^^^^^^^^^^^^^*##.................#^.....#^.^#....#.........................#.....^#^^^^^^^#..^#^^^^^^^*...................................................................................................................................................................................................
..........................................^#*^.....#^.....^**^^^^^^^^^...^^^^*#....#*^^^^^^^^^^^^^^*##............######*..^^....^##....#....*##^^^..............#^.......#^^^^^^#*..^#^^^^^^#....................................................................................................................................................................................................
...........................................#*^.....^.^....^*#^^^^^^^^^^^..^^^^#^....^#*^^^^^^^^^^###.............#........##^##*#^..^##^..^#^.....#...........^#..........#*^^^^*#....#^^^^*#.....................................................................................................................................................................................................
...........................................^#^^....^..*....^#*^^^^^^^^^^^^^^^^*#......^##^^^^^^##^...............#...........*##.........#.......^#.........^#............^*^^^*#.....#*^^*#......................................................................................................................................................................................................
............................................#*^^...^...*....*#^^^^^^^^^^^^^^^^*#.........##*^##^.................#..............^#^...^#^........#........^*...............#^^*#......#*^**.......................................................................................................................................................................................................
............................................^#*^...^....^^...##^^^^^^^^^^^^^^^^#...........##....................^#^.............#^....#^........#^.....^#.................#^^#.......****........................................................................................................................................................................................................
.............................................*#^^..^......*...###*^^^^^^^^^^^^^#..........#........................*^..........^####*###*^^.....^#.......#.................#^^........^*..........................................................................................................................................................................................................
..............................................##^^.^........^.^#.^##^^^^^^^^^^^#^.......#^.................^......^#^^......^*##......^^###****##........#.............................*..........................................................................................................................................................................................................
...............................................#*^^^..........^^*...*##**^^^^^^#^.....#*.................^*.......#*^^^^^^*##*^**.....#.^^^*###*.........#........................................................................................................................................................................................................................................
................................................#*^#............^*......^####**#*....#^^#^..............^#........*#######*^...#^.....#.....^^#^.........*^.......................................................................................................................................................................................................................................
.................................................*^*.................................#....#............*#.............*^^......#......#.......#...........#.......................................................................................................................................................................................................................................
......................................................................................^^...*^.........#*.............#^.......^#.....^*......^*...........#.......................................................................................................................................................................................................................................
.....................................................................................*......^........#^.............^^........#.......*#*^^^^*............#.......................................................................................................................................................................................................................................
...................................................................................^^........#......#...............#^^^....^**...........................*^......................................................................................................................................................................................................................................
..................................................................................*...........#...^#......................^................................#......................................................................................................................................................................................................................................
................................................................................*.............^..*^........................................................#......................................................................................................................................................................................................................................
..............................................................................^^...............##..........................................................#^.....................................................................................................................................................................................................................................
.............................................................................*.................#^...........................................................#.....................................................................................................................................................................................................................................
...........................................................................*^.................^.............................................................#.....................................................................................................................................................................................................................................
.........................................................................^*.................^^..............................................................^^....................................................................................................................................................................................................................................
........................................................................*^.................##................................................................#....................................................................................................................................................................................................................................
......................................................................^*.................**#.................................................................#^...................................................................................................................................................................................................................................
.....................................................................#^................^^.#...................................................................#.........................................................................................................................................................................................^.........................................
....................................................................*.................#..#....................................................................^#....................................................................................................................................................................................^.....^*......................................
...................................................................^................*...#......................................................................**..................................................................................................................................................................................^......^.......................................
.................................................................^................^^...#........................................................................#*..............................................................................................................................................................................................^.................................
................................................................^...............^^....#..........................................................................^#.........................................................................................................................####..................................................^............^...^..............................
...............................................................^..............^^.....#.............................................................................*#.......................................................................................................................#....^#..............................................^......^....^....................................
...............................................................^...........^#^......#...............................................................................#......................................................................................................................*^.......#^...........................................^.....^....^.....................................
................................................................^^......^#^........#..............................................................................##.......................................................................................................................#....*.....#.........................................^.....^...^.......................................
.................................................................................^#...........................................................................^####........................................................................................................................#....#^.....^#.......................................^....^...^.........^..............................
.................................................................................#^.....................................................................^####*^^^^#^.......................................................................................................................#.............#.....................................^^^^^*..^.........^................................
.....................................................................................^######*^^.............................................^#########*^^^^^^^^^^^*#.......................................................................................................................#..............#...........................................*........^.....^............................
.......................................................................................#^^^^^^^^^^^^***#########################*###***^^^^^^^^^^^*#^^^^^^^^^^^..^^#........................................................................................................................#..............#...........................................^....^....^^.........^.....................
......................................................................................##^^^^^^^^^^^^^^^^^^^^^#^^^^^^^^^^^^^^^*#^^^^^^^^^^^^^^^^^^^*#*^^^..........^##.......................................................................................................................#...............#............................................*....^^..................................
.....................................................................................^#^^^^^^^^^^^^^^^^^^^^^##^^^^^^^^^^^^^^^##^^^^^^^^^^^^^^^^^..^#^.............^^#........................................................................................................................#...............*.............................................^^.....................................
.....................................................................................#*^^.....^^^^^^^^^^^^^*#^^^^^^^^^^^^^^^^##^^^^...............^#^..............^#*........................................................................................................................#..............*..............................................^...........^^^.......................
....................................................................................##^^...................##*^^^............#^^^^................^#^^.............^^#.........................................................................................................................#..............*.............................................^.....................................
...................................................................................##^^...................^#^^^^.............#^^^^................^#^^..............^#^.......................................................................................................^##################.............##############################*.....................................................
..................................................................................*#^^....................##^^^..............#^^^.................^#^^..............^*#...................................................................................................^##^^^^^^^^^^^^^^******##...........###########################*^#^.....................................................
.................................................................................^#^^^...................^#^^^..............^#^^^.................^#^^...............^#*...............................................................................................##^^^^^^^^^^^^^^^^^^^*******##.........*########################^^^^#^....................####^............................
................................................................................^#^^^....................##^^^..............##^^^.................^#^^................^#...........................................................................................##*###################################^^^^^#####################^^^#^^^*#^..................^#....*#^.^........................
...............................................................................^#^^^....................^#^^^...............#*^^^.................^#^^................^*#..........................................................................................*......................^^^^^^^#*^^**********************^^^^*#^^^^^#^^^##^..................#......^^..#^......................
..............................................................................^#^^^.....................##^^^...............#^^^..................^#^^^................^#*.........................................................................................*............................^#^.^^^^^^^^^^^^^^^^^^^^^^^^^^^*#^^^^^#^^###^..................#..........#.......................
.............................................................................^#^^^.....................##^^^...............^#^^^..................^#^^^................^^#^........................................................................................*............................^#^.^^^^^^^^^^^^^^^^^^^^^^^^^^^*#^^^^^#^^###^..................#.........#^.......................
............................................................................##^^^......................#^^^................##^^^..................^#^^^...............^^^##.......................................................................................^*............................^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*#^^^^^#^^###^..................#^......^#.........................
...........................................................................##^^^......................##^^^................#*^^^..................^#^^^..............^*##.....^^..................................................................................^*............................^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*#^^^^^#*####^...................^#....^...........................
..........................................................................#*^^^......................*#^^^.................#^^^...................^#^^^^..........^*##^.....^.....................................................................................^*............................^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^^^^#*####^.....................................................
........................................................................##^^^^^......................#*^^^................^#^^^...................^#*^^^.....^####.................................................................................................*..........................^.^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^^^^######^.........................^...........................
........................................................................#*^^^^......................##^^^.................*#^^^...................^###**^^.........................................................................................................*........................^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^^^^######^.......................#*..#.........................
.........................................................................###^^.....................*#^^^^.................##^^^..................##^^^..............................................................................................^..............*........................^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^^^^######^......................#*^...^...^^...................
............................................................................##*....................#*^^^..................#*^^^.............^###....*^.............................................................................................................*.......................^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^^^^######^......................#*^.......#....................
...............................................................................^##*...............##^^^^..................###############*^.........#..............................................................................................................*.....................^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^^^^######^......................#*......^#.....................
....................................................................................^###^........*#.###^.................^#..#......................#..............................................................................................................*....................^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^^^*######^......................*#...^^^.......................
...........................................................................................#^*#####.......*################^.#......................#.............................................................................................................^*...................^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^^^#######^.....................................................
...........................................................................................*......................*^.........#.....................^#..............................................................^...............................................*.................^^^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^^^#######^.....................................................
...........................................................................................*......................#..........#.....................^*..............................................................................................................*..................^^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^#########^.....................................................
.........................................^.................................................*......................#..........#.....................*^.............................................................................................................*#**********************########################################*^*#######^.....................................................
...........................................................................................*......................*..........#.....................#^...............................................................................^..............................*.......^^^^^^^^^^^^^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^^########^.....................................................
...........................................................................................*.....................^*..........#^....................#...............................................................................................................*.........^^^^^^^^^^^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^^########^.....................................................
...........................................................................................*.....................^^..........*^....................#...........^...^..............................................................................................^*.......^^^^^^^^^^^^^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^*########^.....................................................
...........................................................................................*.....................#^..........*^...................^*..............^................................................................................................*.....^^^^^^^^^^^^^^^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^*########^.....................................................
...........................................................................................*.....................#...........**...................*^...^..........................................................................................................^*..^^^^^^^^^^^^^^^^^^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^#########^.....................................................
........................................................................^^............^....#.....................#...........^*...................#.............................................^.......................................^..^.......................*^.^^^^^^^^^^^^^^^^^^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^#########^.....................................................
.........................^...^..............................^^.........................^...#....................^#...........^*...................#..................................................................................^..^^^........................*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^^#########^.............................................^.......
.......................^.^^.......................................^....^...................#....................^*..^........^#..................^*................................................................................................................*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^*#########^.....................................................
...........................................................................................#....................*^............#..................*^...............................................................^#*^.............^*#*^.........................^^*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^##########^........^*.^.........................................
...........................................................................................#^...................#.............#..................#.............................................................#^.........................##.......^*#*^.#........*#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##^##########^^................^...........^#^#....................
...........................................................................................*^..................^*......^.^....#.................^*............................................................#....*#*.......................^#..#*......^.........#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^##*##########*.................*#.^.......#....*^..................
...........................................................................................^#..................*^...^.........*^................#..............................................................^*.............................^##........^^.......^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^###########*...........^............^^..^#......*..................
............................................................................................#..................#..............^*...............^*............................^.^..................................#^..........................#**#.......^^.......^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^########^...............................*^.......#.................
.^.............................................................^^...........................#.................#^...............#...............#.....................................................................^##^.................*#*.....#^.....*........^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#####....................^*###*^^^*###^.#.........*................
............................................................................................*^...............^*................#..............^*...........................................................................^##########*^............^*...#....^....*^^^^^^^^^^^^^^^^^^*^^*#^^^^^^#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#*..................*#^................###^.......#................
.............................................................................................#..............^#.................#^.............#.......................................................................................................^##.....................................................................................^#*....................#....^.^^^^^#................
.............................................................................................#^............*#..................^#............#^..........................................................................................^##*^............^#*..............................................................................^#......................#*.....^............^..........
................................^.............................................................#^.........^#.....................#^..........*^..................................^.....................................###^..........^#*........................#^........................................................................*^......................#^...............................
......................................................................................^........^#**####*^........................####*^^^*#*...............................*..*.......................................*....^#^...^#........................**....#......................................................................#....###.............^#*..................................
............................................................................^..........^.......^.........................................................................^..^...^....................................^^.......###..........................^....^#.................................^...................................*................^##^......................................
....................................................................................................................................................................................................................^#^.......^#.^#^..........................#^.......................................................................*^....^^*###^..............................................
......................................................................................................................^...............................................................................
4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?