목록전체 글 (180)
현재
설명 몇개를 출력할지 갯수를 정하고, 입력된 자연수를 뒤집었을때 320을 입력했을때 0은생략 23이소수인지 아닌지 확인한다 예시 입력 1 9 32 55 62 20 250 370 200 30 100 예시 출력 1 23 2 73 2 3 더보기 import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException{ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); for(int i = 0; i 0){ // temp = temp / 10; // length++; // } // int list[] = new int[leng..
설명 소수의 개수를 구하라. N(2
[Board.jsx] import axios from "axios"; import { useEffect, useState } from "react"; import { useParams } from "react-router-dom"; const Board = () =>{ const [writer, setWriter] = useState(''); const [content, setContent] = useState(''); const [commentData , setCommentData] = useState([]); const a = (e)=>{ console.log(e.target.value); setWriter(e.target.value); } const b = (e)=>{ console.log(e.ta..
[SaveForm.jsx] import axios from 'axios'; import { useState } from 'react'; const SaveForm = () => { const [writer, setWriter] = useState(''); const [pass, setPass] = useState(''); const [title, setTitle] = useState(''); const [content, setContent] = useState(''); const [file, setFile] = useState(null); // 현재 파일이 저장 되어있는지 알기 위해 const fileCheck = (e) =>{ setFile(e.target.files[0]); console.log(e...
설명 반복되는 횟수 입력 길이는 전부 7, #은 1 *은 0 이진수로 출력후 이거를 아스키 코드로 변환하라 예시 입력 1 4 #****###**#####**#####**##** 예시 출력 1 COOL 더보기 .replace / substring 을 사용하는게 훨신 간단하다.. 더보기 import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException{ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); String input = sc.next(); String answer = ""; int check[] = new..
import axios from "axios"; import { useEffect, useState } from "react"; const Home = () => { const [data , setData] = useState([]); --> 가져올 데이터 const [displayData , setDisplayData] = useState([]); --> 보여줄 데이터 const [itemsPerPage , setItemsPerPage] = useState(10); --> 한페이지에 몇개를 보여줄 것인가 const [currentPage , setCurrentPage ] = useState(1); -> 현재 페이지 넘버 useEffect(()=>{ axios.get("/board/") .then( re..
설명 반복되는알파벳만큼 압축해라 예시 입력 1 KKHSSSSSSSE 예시 출력 1 K2HS7E 예시 입력 2 KSTTTSEEKFKKKDJJGG 예시 출력 2 KST3SE2KFK3DJ2G2 더보기 길이에 주의할것!! 더보기 import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException{ Scanner sc = new Scanner(System.in); char strList[] = sc.next().toCharArray(); char temp = 32; // 32인경우 공백으로 알고있음 for(int i = 0 ; i
설명 첫번째문자열과 두번째 문자열의 최단거리를 구하시오 예시 입력 1 teachermode e 예시 출력 1 1 0 1 2 1 0 1 2 2 1 0 더보기 Math.min(a,b) 초기값에 주의하여야 한다. 더보기 import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException{ Scanner sc = new Scanner(System.in); char inputList[] = sc.next().toCharArray(); char cha = sc.next().charAt(0); int leftList[] = new int[inputList.length]; int ..