結果

問題 No.321 (P,Q)-サンタと街の子供たち
ユーザー cielciel
提出日時 2015-12-14 00:36:57
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 228 bytes
コンパイル時間 439 ms
コンパイル使用メモリ 11,332 KB
実行使用メモリ 15,432 KB
最終ジャッジ日時 2023-10-13 15:09:16
合計ジャッジ時間 8,716 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 84 ms
15,232 KB
testcase_02 AC 81 ms
15,140 KB
testcase_03 AC 80 ms
15,220 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 81 ms
15,128 KB
testcase_07 AC 81 ms
15,188 KB
testcase_08 AC 82 ms
15,260 KB
testcase_09 AC 82 ms
15,232 KB
testcase_10 AC 81 ms
15,240 KB
testcase_11 WA -
testcase_12 AC 82 ms
15,204 KB
testcase_13 AC 81 ms
15,200 KB
testcase_14 WA -
testcase_15 AC 226 ms
15,156 KB
testcase_16 AC 138 ms
15,312 KB
testcase_17 AC 82 ms
15,228 KB
testcase_18 AC 149 ms
15,260 KB
testcase_19 WA -
testcase_20 AC 221 ms
15,268 KB
testcase_21 WA -
testcase_22 AC 106 ms
15,164 KB
testcase_23 AC 201 ms
15,408 KB
testcase_24 AC 111 ms
15,392 KB
testcase_25 WA -
testcase_26 AC 219 ms
15,304 KB
testcase_27 WA -
testcase_28 AC 179 ms
15,376 KB
testcase_29 AC 226 ms
15,292 KB
testcase_30 AC 85 ms
15,240 KB
testcase_31 AC 84 ms
15,036 KB
testcase_32 AC 156 ms
15,432 KB
testcase_33 WA -
testcase_34 AC 132 ms
15,256 KB
testcase_35 WA -
testcase_36 AC 90 ms
15,204 KB
testcase_37 AC 169 ms
15,228 KB
testcase_38 AC 151 ms
15,228 KB
testcase_39 WA -
testcase_40 AC 214 ms
15,296 KB
testcase_41 WA -
testcase_42 AC 197 ms
15,412 KB
testcase_43 AC 135 ms
15,188 KB
testcase_44 AC 183 ms
15,252 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#!/usr/bin/ruby
a,b=gets.split.map(&:to_i).sort
if b==0
	p 0
#elsif a==0
#	gets;p $<.count{|e|x,y=e.split.map &:to_i;x%b==0&&y%b==0}
else
	g=b.gcd a
	gets;p $<.count{|e|x,y=e.split.map{|e|e.to_i.abs%g}.sort;x==0&&y%(b-a)==0}
end
0