結果
問題 |
No.321 (P,Q)-サンタと街の子供たち
|
ユーザー |
|
提出日時 | 2015-12-14 01:11:05 |
言語 | Ruby (3.4.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 324 bytes |
コンパイル時間 | 345 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,544 KB |
最終ジャッジ日時 | 2024-09-15 11:59:25 |
合計ジャッジ時間 | 9,152 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 9 WA * 30 RE * 2 |
コンパイルメッセージ
Syntax OK
ソースコード
#! ruby # yukicoder My Practice # author: Leonardone @ NEETSDKASU def gs(); gets.chomp; end def gi(); gets.to_i; end def gss(); gets.chomp.split; end def gis(); gss.map(&:to_i); end P, Q = gis N = gi d = P == Q ? P : (P - Q).abs c = 0 N.times do x, y = gis.map(&:abs) c += 1 if x % d == 0 && y % d == 0 end p c