結果
問題 | No.1183 コイン遊び |
ユーザー | 👑 yumechi |
提出日時 | 2021-03-02 01:12:06 |
言語 | Scala(Beta) (3.3.1) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 423 bytes |
コンパイル時間 | 10,089 ms |
コンパイル使用メモリ | 253,008 KB |
実行使用メモリ | 88,152 KB |
最終ジャッジ日時 | 2023-07-26 14:17:39 |
合計ジャッジ時間 | 35,680 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 976 ms
62,780 KB |
testcase_01 | AC | 977 ms
63,808 KB |
testcase_02 | AC | 992 ms
62,848 KB |
testcase_03 | AC | 983 ms
62,980 KB |
testcase_04 | AC | 981 ms
62,932 KB |
testcase_05 | AC | 972 ms
62,732 KB |
testcase_06 | AC | 982 ms
62,848 KB |
testcase_07 | AC | 1,005 ms
62,748 KB |
testcase_08 | AC | 1,064 ms
63,220 KB |
testcase_09 | AC | 1,081 ms
63,712 KB |
testcase_10 | AC | 1,403 ms
76,248 KB |
testcase_11 | AC | 1,698 ms
76,404 KB |
testcase_12 | TLE | - |
testcase_13 | TLE | - |
testcase_14 | TLE | - |
testcase_15 | TLE | - |
testcase_16 | TLE | - |
testcase_17 | TLE | - |
testcase_18 | TLE | - |
testcase_19 | TLE | - |
testcase_20 | TLE | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
ソースコード
import java.util.Scanner object Main extends App { val sc = new Scanner(System.in) val n = sc.nextInt val al = Vector.fill(n)(sc.nextInt) val bl = Vector.fill(n)(sc.nextInt) var ans = 0 var cnt = 0 var f = al(0) != bl(0) while(cnt < n) { val c = al(cnt) != bl(cnt) if(c) { if(f) { ans += 1 f = false } } else { f = true } cnt += 1 } println(ans) }