結果
| 問題 | No.781 円周上の格子点の数え上げ | 
| コンテスト | |
| ユーザー |  kl_tomason | 
| 提出日時 | 2019-01-12 08:01:12 | 
| 言語 | Ruby (3.4.1) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 277 bytes | 
| コンパイル時間 | 163 ms | 
| コンパイル使用メモリ | 7,296 KB | 
| 実行使用メモリ | 101,920 KB | 
| 最終ジャッジ日時 | 2024-12-16 03:36:39 | 
| 合計ジャッジ時間 | 21,275 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 WA * 6 TLE * 5 | 
コンパイルメッセージ
Syntax OK
ソースコード
X, Y = gets.split.map &:to_i
h = Hash.new(0)
ans = 0
for y in 0..Math.sqrt(Y) do
    for x in 0..(Math.sqrt(Y) - 1) do
        rr = y**2 + x**2
        if X <= rr && rr <= Y then
            h[rr] += 1
            ans = [ans, h[rr]].max 
        end
    end
end
puts ans*4
            
            
            
        