結果
| 問題 |
No.2177 Recurring ab
|
| コンテスト | |
| ユーザー |
_yurimoir
|
| 提出日時 | 2023-01-06 23:10:02 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 473 bytes |
| コンパイル時間 | 3,111 ms |
| コンパイル使用メモリ | 243,352 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-30 19:52:16 |
| 合計ジャッジ時間 | 3,885 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 WA * 4 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long
int32_t main(){
long double 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;
long double p1=((long double)n*i+sqrt((long double)n*n*i*i+4.0*(1.0+n*j)))/2.0;
int x1=(int)p1;
if(x1<limit)continue;
ans+=x1-limit+1;
}
}
cout<<ans<<endl;
}
_yurimoir