結果

問題 No.321 (P,Q)-サンタと街の子供たち
ユーザー angel_p_57angel_p_57
提出日時 2015-12-21 23:33:22
言語 Ruby
(3.3.0)
結果
AC  
実行時間 227 ms / 2,000 ms
コード長 136 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 11,492 KB
実行使用メモリ 25,940 KB
最終ジャッジ日時 2023-09-21 03:28:10
合計ジャッジ時間 8,466 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
15,180 KB
testcase_01 AC 83 ms
15,340 KB
testcase_02 AC 84 ms
15,160 KB
testcase_03 AC 84 ms
15,256 KB
testcase_04 AC 83 ms
15,292 KB
testcase_05 AC 83 ms
15,048 KB
testcase_06 AC 83 ms
15,244 KB
testcase_07 AC 82 ms
15,152 KB
testcase_08 AC 83 ms
15,344 KB
testcase_09 AC 83 ms
15,212 KB
testcase_10 AC 83 ms
15,148 KB
testcase_11 AC 82 ms
15,332 KB
testcase_12 AC 83 ms
15,256 KB
testcase_13 AC 83 ms
15,276 KB
testcase_14 AC 164 ms
20,428 KB
testcase_15 AC 226 ms
25,940 KB
testcase_16 AC 135 ms
19,276 KB
testcase_17 AC 83 ms
15,052 KB
testcase_18 AC 147 ms
20,216 KB
testcase_19 AC 166 ms
22,152 KB
testcase_20 AC 219 ms
25,916 KB
testcase_21 AC 163 ms
21,092 KB
testcase_22 AC 108 ms
16,732 KB
testcase_23 AC 206 ms
24,108 KB
testcase_24 AC 116 ms
17,240 KB
testcase_25 AC 156 ms
20,916 KB
testcase_26 AC 213 ms
25,500 KB
testcase_27 AC 175 ms
22,676 KB
testcase_28 AC 173 ms
22,356 KB
testcase_29 AC 227 ms
25,940 KB
testcase_30 AC 88 ms
15,404 KB
testcase_31 AC 85 ms
15,472 KB
testcase_32 AC 155 ms
20,344 KB
testcase_33 AC 146 ms
20,272 KB
testcase_34 AC 130 ms
18,964 KB
testcase_35 AC 185 ms
22,980 KB
testcase_36 AC 86 ms
15,608 KB
testcase_37 AC 160 ms
21,420 KB
testcase_38 AC 147 ms
20,224 KB
testcase_39 AC 104 ms
16,540 KB
testcase_40 AC 215 ms
25,356 KB
testcase_41 AC 120 ms
17,576 KB
testcase_42 AC 193 ms
23,860 KB
testcase_43 AC 136 ms
19,180 KB
testcase_44 AC 177 ms
22,600 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

c,g=p~-$<.read.split(?\n).count{|s|x,y=s.split.map &:to_i;g ?y&&(g>0?x%g<1&&y%g<1&&(x-y)*c/g%2<1:x*x+y*y<1):(1>g=x.gcd(y))||c=x*y/g/g%2}
0