結果
| 問題 | No.280 歯車の問題(1) |
| コンテスト | |
| ユーザー |
tenten
|
| 提出日時 | 2022-07-29 17:34:48 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
MLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 1,167 bytes |
| 記録 | |
| コンパイル時間 | 1,609 ms |
| コンパイル使用メモリ | 83,684 KB |
| 実行使用メモリ | 128,676 KB |
| 最終ジャッジ日時 | 2026-04-02 15:29:02 |
| 合計ジャッジ時間 | 5,522 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 MLE * 1 |
ソースコード
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner();
int n = sc.nextInt();
int a = 0;
int b = 0;
for (int i = 0; i < n; i++) {
int x = sc.nextInt();
if (i == 0) {
b = x;
} else if (i == n - 1) {
a = x;
}
}
System.out.println(a + "/" + b);
}
}
class Scanner {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer("");
public Scanner() throws Exception {
}
public int nextInt() throws Exception {
return Integer.parseInt(next());
}
public long nextLong() throws Exception {
return Long.parseLong(next());
}
public double nextDouble() throws Exception {
return Double.parseDouble(next());
}
public String next() throws Exception {
while (!st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return st.nextToken();
}
}
tenten