백준[JAVA] 1964.오각형, 오각형, 오각형... - 자바


백준[JAVA] 1964.오각형, 오각형, 오각형... - 자바

문제 코드 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { // Arithmetic Sequence static long AS(int N) { long a = 5; long d = 7; // logic for (int i = 0; i < N - 1; i++) { a += d; d += 3; } return a % 45678; } public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(Sy..


원문링크 : 백준[JAVA] 1964.오각형, 오각형, 오각형... - 자바