結果

問題 No.723 2つの数の和
ユーザー cielciel
提出日時 2018-08-07 00:13:46
言語 Ruby
(3.3.0)
結果
AC  
実行時間 188 ms / 2,000 ms
コード長 87 bytes
コンパイル時間 364 ms
コンパイル使用メモリ 11,936 KB
実行使用メモリ 28,744 KB
最終ジャッジ日時 2023-10-19 22:18:27
合計ジャッジ時間 5,061 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
16,104 KB
testcase_01 AC 90 ms
16,104 KB
testcase_02 AC 89 ms
16,104 KB
testcase_03 AC 155 ms
23,636 KB
testcase_04 AC 183 ms
26,220 KB
testcase_05 AC 164 ms
25,096 KB
testcase_06 AC 168 ms
25,412 KB
testcase_07 AC 126 ms
20,232 KB
testcase_08 AC 131 ms
21,576 KB
testcase_09 AC 181 ms
26,360 KB
testcase_10 AC 123 ms
19,988 KB
testcase_11 AC 96 ms
16,668 KB
testcase_12 AC 138 ms
22,052 KB
testcase_13 AC 184 ms
27,120 KB
testcase_14 AC 111 ms
18,756 KB
testcase_15 AC 128 ms
21,336 KB
testcase_16 AC 146 ms
22,840 KB
testcase_17 AC 161 ms
24,732 KB
testcase_18 AC 160 ms
24,556 KB
testcase_19 AC 172 ms
25,040 KB
testcase_20 AC 89 ms
16,104 KB
testcase_21 AC 89 ms
16,104 KB
testcase_22 AC 89 ms
16,104 KB
testcase_23 AC 188 ms
28,744 KB
testcase_24 AC 117 ms
19,224 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n,x,*a=`dd`.split.map &:to_i
h=Hash.new 0
r=0
a.map{|e|h[e]+=1}
a.map{|e|r+=h[x-e]}
p r
0