結果

問題 No.29 パワーアップ
ユーザー takeya_okinotakeya_okino
提出日時 2017-07-14 08:33:04
言語 PHP
(8.3.4)
結果
RE  
実行時間 -
コード長 414 bytes
コンパイル時間 623 ms
コンパイル使用メモリ 30,744 KB
実行使用メモリ 31,236 KB
最終ジャッジ日時 2024-04-16 19:19:04
合計ジャッジ時間 1,808 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 40 ms
30,692 KB
testcase_04 RE -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 RE -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 40 ms
31,088 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 RE -
testcase_21 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$N = trim(fgets(STDIN));
$array = array(0,0,0,0,0,0,0,0,0,0);
for($i = 0; $i < 10; $i++) {
  $array2 = explode(" ", trim(fgets(STDIN)));
  $a = $array2[0] - 1;
  $b = $array2[1] - 1;
  $c = $array2[2] - 1;
  $array[$a]++;
  $array[$b]++;
  $array[$c]++;
}
$ans = 0;
$r = 0;
for($i = 0; $i < 10; $i++) {
  if($array[$i] % 2 == 1) $r++;
  $ans += intdiv($array[$i], 2);
}
$ans += intdiv($r, 4);
print($ans);
?>
0