結果
| 問題 | No.152 貯金箱の消失 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-24 19:07:37 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 7 ms / 5,000 ms |
| コード長 | 305 bytes |
| 記録 | |
| コンパイル時間 | 1,503 ms |
| コンパイル使用メモリ | 210,164 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-07 19:26:04 |
| 合計ジャッジ時間 | 2,653 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int l;
cin>>l;
l/=4;
int ans=0;
for (int i=2;i*i<l;i++)
for (int j=1+i%2;j<i&&2*i*j+2*i*i<=l;j+=2)
if (gcd(i,j)==1)
ans++;
cout<<ans%1000003<<endl;
return 0;
}