結果
問題 | No.781 円周上の格子点の数え上げ |
ユーザー | nebukuro09 |
提出日時 | 2019-01-12 10:52:27 |
言語 | D (dmd 2.106.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 534 bytes |
コンパイル時間 | 771 ms |
コンパイル使用メモリ | 103,452 KB |
実行使用メモリ | 226,912 KB |
最終ジャッジ日時 | 2023-09-03 22:03:28 |
合計ジャッジ時間 | 13,026 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | RE | - |
testcase_03 | WA | - |
testcase_04 | AC | 2 ms
4,380 KB |
testcase_05 | WA | - |
testcase_06 | AC | 4 ms
4,380 KB |
testcase_07 | RE | - |
testcase_08 | AC | 1,902 ms
225,996 KB |
testcase_09 | RE | - |
testcase_10 | AC | 2 ms
4,380 KB |
testcase_11 | AC | 5 ms
4,376 KB |
testcase_12 | TLE | - |
testcase_13 | TLE | - |
testcase_14 | AC | 50 ms
17,268 KB |
testcase_15 | AC | 3 ms
4,380 KB |
testcase_16 | AC | 3 ms
4,376 KB |
testcase_17 | AC | 966 ms
74,248 KB |
testcase_18 | AC | 775 ms
75,380 KB |
testcase_19 | AC | 772 ms
74,272 KB |
testcase_20 | AC | 771 ms
75,472 KB |
ソースコード
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 = 0; i * i + j * j <= Y; ++j) { D[i * i + j * j] += 4; } } D.keys.filter!(k => X <= k && k <= Y).map!(k => D[k]).reduce!max.writeln; }