結果
| 問題 | No.779 Heisei | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-01-12 11:07:17 | 
| 言語 | D (dmd 2.109.1) | 
| 結果 | 
                                RE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 584 bytes | 
| コンパイル時間 | 773 ms | 
| コンパイル使用メモリ | 116,064 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-06-13 02:42:36 | 
| 合計ジャッジ時間 | 1,585 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | RE * 23 | 
ソースコード
import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.string;
void main() {
    auto s = readln.split.map!(to!long);
    auto X = s[0];
    auto Y = s[1];
    long[long] D;
    for (long i = 0; i * i <= Y; ++i) {
        for (long j = i; i * i + j * j <= Y; ++j) {
            D[i * i + j * j] += i == j || i == 0 ? 4 : 8;
        }
    }
    if (Y !in D) D[Y] = 0;
    D.keys.filter!(k => X <= k && k <= Y).map!(k => D[k]).reduce!max.writeln;
}
            
            
            
        