백준: #11283 - 한글 2 [Solved] | Bronze V

https://www.acmicpc.net/problem/11283

Java 16 (Solved)

Status page

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char input = sc.next().charAt(0);
		sc.close();
		
		int iteration = 0;
		for(char i = '\uac00'; i != input + 1; i++) {
			iteration++;
		}
		
		System.out.println(iteration);
	}

}
Haskell - @익명2
import Data.Char

main :: IO ()
main = print . flip (-) 44031 . ord =<< getChar 

재활운동 시작합니다.

1 Like

Haskell

import Data.Char

main :: IO ()
main = print . flip (-) 44031 . ord =<< getChar
1 Like