{{ $t('FEZ002') }}程式設計競賽|
輸入矩形的 長 與 寬,請計算出矩形的 面積。
假設輸入的長與寬皆為正整數。
輸入為兩個整數 L、W,中間以空白分隔,
其中 1 ≤ L, W ≤ 10^4。 代表矩形的長與寬。
請輸出矩形的面積(長 × 寬),結果為整數。
10 5 範例輸出一:50範例輸入二:3 5 範例輸出二:15
==1. Python 參考程式碼 a.py ===
L, W = map(int, input().split())
print(L * W)
==2. C 參考程式碼 a.c ===
#include <stdio.h>
int main() {
int L, W;
scanf("%d %d", &L, &W);
printf("%d\n", L * W);
return 0;
}
==3. C++ 參考程式碼 a.cpp ===
#include <iostream>
using namespace std;
int main() {
int L, W;
cin >> L >> W;
cout << L * W << endl;
return 0;
}
==4. C# 參考程式碼 a.csharp ===
using System;
class Program {
static void Main() {
string[] input = Console.ReadLine().Split();
int L = int.Parse(input[0]);
int W = int.Parse(input[1]);
Console.WriteLine(L * W);
}
}
==5. Java 參考程式碼 Main.java ===
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int L = sc.nextInt();
int W = sc.nextInt();
System.out.println(L * W);
}
}
=== 狀態代碼 (Code) ====
pending 等待中:程式已送出,系統尚未開始評測。
running 執行中:評測伺服器正在執行你的程式。
compiling 編譯中:系統正在編譯你的原始碼。
correct 答對了:所有測資都通過。✅
compiler-error 編譯錯誤:程式無法成功編譯(語法錯誤、缺少 main 等)。
run-error 執行錯誤:程式在執行中發生錯誤(如除以零、記憶體錯誤)。
time-limit 時間超限:執行超過題目限制時間。
memory-limit 記憶體超限:程式使用的記憶體超過上限。
output-limit 輸出超限:輸出過多資料(超過題目規定的上限)。
wrong-answer 答案錯誤:輸出結果與標準答案不符。
no-output 無輸出:程式沒有產生任何輸出。
presentation-error 格式錯誤:輸出內容正確但格式不符合(常被視為 Wrong Answer)。
security-violation 安全性違規:使用被禁止的系統呼叫或試圖存取不允許的資源。
judging 評測中:系統正在評測,不久後會出結果。
internal-error 系統錯誤:DOMjudge 本身或評測機發生問題。
{{ $t('FEZ012') }}
{{ $t('FEZ003') }}2025-10-16
{{ $t('FEZ004') }}2025-10-17|
{{ $t('FEZ005') }}64|