結果

問題 No.321 (P,Q)-サンタと街の子供たち
ユーザー angel_p_57angel_p_57
提出日時 2015-12-14 12:08:52
言語 Ruby
(3.3.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 131 bytes
コンパイル時間 67 ms
コンパイル使用メモリ 11,560 KB
実行使用メモリ 25,900 KB
最終ジャッジ日時 2023-10-13 16:24:55
合計ジャッジ時間 7,061 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 70 ms
15,048 KB
testcase_02 AC 71 ms
15,220 KB
testcase_03 AC 77 ms
15,128 KB
testcase_04 AC 82 ms
15,240 KB
testcase_05 AC 71 ms
15,272 KB
testcase_06 AC 76 ms
15,316 KB
testcase_07 AC 70 ms
15,044 KB
testcase_08 AC 69 ms
15,256 KB
testcase_09 AC 70 ms
15,132 KB
testcase_10 AC 68 ms
15,048 KB
testcase_11 AC 69 ms
15,320 KB
testcase_12 AC 69 ms
15,180 KB
testcase_13 AC 69 ms
15,124 KB
testcase_14 AC 141 ms
20,456 KB
testcase_15 AC 195 ms
25,900 KB
testcase_16 AC 119 ms
19,504 KB
testcase_17 AC 72 ms
15,080 KB
testcase_18 AC 124 ms
20,324 KB
testcase_19 AC 141 ms
21,988 KB
testcase_20 AC 184 ms
25,828 KB
testcase_21 AC 144 ms
21,236 KB
testcase_22 AC 94 ms
16,788 KB
testcase_23 AC 173 ms
24,160 KB
testcase_24 AC 97 ms
17,376 KB
testcase_25 AC 133 ms
20,940 KB
testcase_26 AC 187 ms
25,380 KB
testcase_27 AC 151 ms
22,440 KB
testcase_28 AC 149 ms
22,484 KB
testcase_29 AC 199 ms
25,896 KB
testcase_30 AC 74 ms
15,504 KB
testcase_31 AC 70 ms
15,188 KB
testcase_32 AC 128 ms
20,444 KB
testcase_33 AC 124 ms
20,212 KB
testcase_34 AC 111 ms
18,764 KB
testcase_35 AC 161 ms
22,928 KB
testcase_36 AC 74 ms
15,472 KB
testcase_37 AC 147 ms
21,296 KB
testcase_38 AC 125 ms
20,552 KB
testcase_39 AC 89 ms
16,484 KB
testcase_40 AC 187 ms
25,288 KB
testcase_41 AC 103 ms
17,428 KB
testcase_42 AC 162 ms
23,656 KB
testcase_43 AC 114 ms
19,308 KB
testcase_44 AC 153 ms
22,728 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:(g=x.gcd y;c=g<1?2:x*y/g/g%2)}+c/2
0