結果
| 問題 |
No.1183 コイン遊び
|
| コンテスト | |
| ユーザー |
xRS43BofaUEZ5gc
|
| 提出日時 | 2021-03-16 16:32:49 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 957 bytes |
| コンパイル時間 | 3,261 ms |
| コンパイル使用メモリ | 74,836 KB |
| 実行使用メモリ | 71,156 KB |
| 最終ジャッジ日時 | 2024-11-08 02:08:47 |
| 合計ジャッジ時間 | 29,353 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 16 WA * 4 TLE * 1 -- * 11 |
ソースコード
import java.util.Scanner;
public class HelloWorld {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] ai = new int[n];
int[] bi = new int[n];
for (int i = 0; i < n; i++) {
ai[i] = sc.nextInt();
}
for (int i =0; i < n; i++) {
bi[i]=sc.nextInt();
}
sc.close();
int count = 0;
for (int i = 0; i < n; i ++) {
if (ai[i] != bi[i]) {
for (int j = i; j < n; j ++) {
if (ai[j] == bi[j]) {
count ++;
i = j;
break;
}
if (j == n-1) {
count ++;
break;
}
}
}
}
System.out.println(count);
}}
xRS43BofaUEZ5gc