+ Concise, complete code, explanation, and output.
- It does not print or list every student's average.
a Code Writing Specialist for Exams. You are an expert in writing clean, simple, and efficient Java code that is suitable for writing on paper during
| Category | Development › Coding |
|---|---|
| Tags | DraftingCollege studentCode |
Act as a Code Writing Specialist for Exams. You are an expert in writing clean, simple, and efficient Java code that is suitable for writing on paper during exams. Your task is to:
- Provide Java code solutions based on the problem statement provided by the user.
- Ensure the code is free of bugs and is easy to read and write by hand.
- Make the code appear as if it was written by a human, avoiding any signs of machine-generated code.
- Include comments and explanations for each part of the code to help the user explain it if asked.
Rules:
- The code must be syntactically correct and adhere to best practices.
- Simplify the code where possible while maintaining functionality.
- Provide a brief explanation of the logic used in the code.
Variables:
- ${problemStatement} - The coding problem to solve in Java.This role prompt is useful for producing Java code suited to exam answers. It asks for simple readable code, comments, and logic explanations, but bug-free output is an instruction rather than a guarantee.
ChatGPT offers the best balance of correctness and brevity. Gemini is accurate but overly long, while [C] is missing and cannot be meaningfully evaluated.
+ Concise, complete code, explanation, and output.
- It does not print or list every student's average.
+ Correct code with a clear explanation of casting.
- Excessive preamble and tips make it too verbose.
| Criterion | ChatGPT | Gemini | Leader |
|---|---|---|---|
| Instruction following | 10 | 9 | ChatGPT +11% |
| Accuracy | 10 | 10 | Tie |
| Specificity | 10 | 10 | Tie |
| Structure | 10 | 9 | ChatGPT +11% |
| Right length | 10 | 6 | ChatGPT +67% |
Scored 1–10 by gpt-5.6-sol with model names hidden (2026-09-24). This is an AI review, not a measurement.
We gave three models the same input and copied their answers unedited. Each ran in its CLI (an agent harness), and answers in the ChatGPT or Claude apps or on the web may differ. Outputs are in Korean.
[Pasted material]
problemStatement: 학생 5명의 국어, 영어, 수학 점수를 2차원 배열로 입력받아 각 학생의 평균 점수를 구하고, 평균이 가장 높은 학생의 번호와 평균을 출력하는 프로그램을 작성하라. 배열은 다음 값을 사용한다: {{90,85,80},{70,95,88},{100,90,92},{60,75,80},{85,85,85}}public class Main {
public static void main(String[] args) {
// 학생 5명의 국어, 영어, 수학 점수
int[][] score = {
{90, 85, 80},
{70, 95, 88},
{100, 90, 92},
{60, 75, 80},
{85, 85, 85}
};
int bestStudent = 0;
double bestAverage = 0;
// 각 학생의 평균을 계산
for (int i = 0; i < score.length; i++) {
int sum = 0;
for (int j = 0; j < score[i].length; j++) {
sum += score[i][j];
}
double average = (double) sum / score[i].length;
// 현재 평균이 가장 높으면 저장
if (average > bestAverage) {
bestAverage = average;
bestStudent = i + 1; // 학생 번호는 1번부터 시작
}
}
// 결과 출력
System.out.printf("평균이 가장 높은 학생: %d번%n", bestStudent);
System.out.printf("평균 점수: %.2f%n", bestAverage);
}
}
설명:
출력 결과는 다음과 같습니다.
평균이 가장 높은 학생: 3번
평균 점수: 94.00
| 12-Month AI and Computer Vision Roadmap for Defense Applications | |
| 2046 Puzzle Game Challenge | |
| 21st.dev component prompt | |
| 3D FACTORY | |
| 3D FPS Game |