結果

問題 No.781 円周上の格子点の数え上げ
ユーザー 🍮かんプリン
提出日時 2019-02-10 12:02:19
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
RE  
実行時間 -
コード長 389 bytes
コンパイル時間 1,237 ms
コンパイル使用メモリ 160,260 KB
実行使用メモリ 42,196 KB
最終ジャッジ日時 2024-07-05 23:06:26
合計ジャッジ時間 4,611 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13 RE * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
#include<math.h>
using namespace std;

int a[10000001];

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int x,y;
    int m;
    cin >> x >> y;
    m=sqrt(x>y?x:y);
    for (int i=1;i<=m;i++)
        for (int j=0;j<=m;j++)
            a[i*i + j*j]+=4;
    m=0;
    for (int i=x;i<=y;i++) if (m<a[i]) m=a[i];
    cout << m << endl;
    return 0;
}
0