Submission #74077485


Source Code Expand

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        InputReader reader = new InputReader(System.in);
        PrintWriter writer = new PrintWriter(System.out, false);
        int D = reader.nextInt();
        double radius = 0.5 * D;
        double area = Math.PI * radius * radius;
        writer.println(area);
        writer.close();
        System.exit(0);
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
        public double nextDouble() {
            return Double.parseDouble(next());
        }
        public String nextLine() {
            String str = "";
            try {
                str = reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}

Submission Info

Submission Time
Task A - π
User UttamS
Language Java24 (OpenJDK 24.0.2)
Score 100
Code Size 1648 Byte
Status AC
Exec Time 62 ms
Memory 39456 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 10
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 62 ms 39444 KiB
00_sample_01.txt AC 58 ms 39364 KiB
00_sample_02.txt AC 58 ms 39456 KiB
01_random_00.txt AC 58 ms 39012 KiB
01_random_01.txt AC 57 ms 38992 KiB
01_random_02.txt AC 58 ms 39164 KiB
01_random_03.txt AC 58 ms 39020 KiB
01_random_04.txt AC 58 ms 39200 KiB
01_random_05.txt AC 57 ms 39060 KiB
01_random_06.txt AC 58 ms 39236 KiB