結果
問題 |
No.3156 Count That Day's N
|
ユーザー |
![]() |
提出日時 | 2025-05-25 00:46:52 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 575 bytes |
コンパイル時間 | 3,052 ms |
コンパイル使用メモリ | 276,844 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-05-25 00:47:01 |
合計ジャッジ時間 | 8,539 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 25 WA * 7 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { long long K, N; cin >> K >> N; int ans = 0; for (unsigned long long x = 1; x <= 1e3; x++) { for (unsigned long long y = 1; y <= 1e4; y++) { unsigned long long A = x * x * x * x * x * x + y * y * y * y; if (A % K != 0) { continue; } unsigned long long B = round(sqrtl(A / K)); if (B * B == A / K && A <= N) { ans++; } } } cout << ans; }