結果

問題 No.182 新規性の虜
ユーザー ayaaya
提出日時 2019-07-30 16:49:54
言語 PHP
(8.3.4)
結果
AC  
実行時間 30 ms / 5,000 ms
コード長 645 bytes
コンパイル時間 614 ms
コンパイル使用メモリ 18,440 KB
実行使用メモリ 33,236 KB
最終ジャッジ日時 2023-09-18 08:36:42
合計ジャッジ時間 2,354 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
18,884 KB
testcase_01 AC 15 ms
18,816 KB
testcase_02 AC 15 ms
18,808 KB
testcase_03 AC 14 ms
18,748 KB
testcase_04 AC 15 ms
18,732 KB
testcase_05 AC 15 ms
18,848 KB
testcase_06 AC 15 ms
18,764 KB
testcase_07 AC 15 ms
18,756 KB
testcase_08 AC 23 ms
26,844 KB
testcase_09 AC 30 ms
33,236 KB
testcase_10 AC 28 ms
31,224 KB
testcase_11 AC 25 ms
26,908 KB
testcase_12 AC 20 ms
22,784 KB
testcase_13 AC 16 ms
18,604 KB
testcase_14 AC 15 ms
18,848 KB
testcase_15 AC 15 ms
18,880 KB
testcase_16 AC 15 ms
18,612 KB
testcase_17 AC 15 ms
18,840 KB
testcase_18 AC 21 ms
26,860 KB
testcase_19 AC 19 ms
22,812 KB
testcase_20 AC 18 ms
20,736 KB
testcase_21 AC 22 ms
26,848 KB
testcase_22 AC 19 ms
22,724 KB
testcase_23 AC 15 ms
18,844 KB
testcase_24 AC 28 ms
33,148 KB
testcase_25 AC 19 ms
24,808 KB
testcase_26 AC 17 ms
20,720 KB
testcase_27 AC 15 ms
18,772 KB
evil01.txt AC 29 ms
33,336 KB
evil02.txt AC 30 ms
33,256 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
/*
No.182 新規性の虜
問題文
kamipeipaa君は新しいものが大好きです。
kamipeipaa君はある日N個の整数A1,A2,A3,....,ANを見つけました。
整数Aiに対して,Ai=Ajとなるjがi以外に存在しなければ,Aiは新規性があるのではないかとkamipeipaa君は考えました。 
上記の条件を満たす整数がいくつあるかkamipeipaa君に教えてあげてください。
入力
N
A1 A2 ... AN
*/
$fuyou=trim(fgets(STDIN));
$input=explode(" ",(trim(fgets(STDIN))));
$input=array_count_values($input);
$cnt=0;
foreach($input as $value){
  if($value==1){
    $cnt++;
  }
}
echo $cnt;
?>
0