結果
| 問題 |
No.2979 直角三角形の個数
|
| コンテスト | |
| ユーザー |
👑 testestest
|
| 提出日時 | 2024-11-21 21:50:16 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 260 bytes |
| コンパイル時間 | 2,995 ms |
| コンパイル使用メモリ | 243,300 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-02 23:30:06 |
| 合計ジャッジ時間 | 5,203 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 18 WA * 8 |
ソースコード
//naive
#include<bits/stdc++.h>
using namespace std;
using i64=long long;
int main(){
i64 N;
cin >> N;
if(N>1e8)return 0;
i64 ans=0;
for(i64 i=1;4*i*i<=N;i++)for(i64 j=i+1;2*j*j+2*i*j<=N;j+=2)if(__gcd(i,j)==1)ans+=N/(2*j*j+2*i*j);
cout << ans << endl;
}
testestest