結果
問題 |
No.2177 Recurring ab
|
ユーザー |
![]() |
提出日時 | 2023-01-06 23:15:03 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 472 bytes |
コンパイル時間 | 2,838 ms |
コンパイル使用メモリ | 243,360 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-30 20:03:04 |
合計ジャッジ時間 | 3,928 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 WA * 4 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define int long long #define ld long double int32_t main(){ ld n; cin>>n; int ans=0; for(int i=0;i<10;i++){ for(int j=0;j<10;j++){ if(i==j)continue; int limit=max(i,j)+1; ld p1=((ld)n*i+sqrt((ld)n*n*i*i+(ld)4.0*((ld)1.0+n*j)))/(ld)2.0; int x1=(int)p1; if(x1<limit)continue; ans+=x1-limit+1; } } cout<<ans<<endl; }