結果

問題 No.112 ややこしい鶴亀算
ユーザー n3k2t1
提出日時 2019-07-11 23:01:37
言語 JavaScript
(node v23.5.0)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 28 ms
コンパイル使用メモリ 6,692 KB
実行使用メモリ 41,324 KB
最終ジャッジ日時 2024-10-13 01:11:55
合計ジャッジ時間 2,208 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

const lines = require('fs')
  .readFileSync('/dev/stdin', 'utf-8')
  .trim().split('\n').values();

const N = Number(lines.next().value);
const a = lines.next().value.split(' ').map(x => Number(x));

const max = Math.max(...a);
const crane = a.reduce((a, x) => a + (x === max ? 1 : 0), 0);

console.log(crane, N - crane);
0