結果
| 問題 |
No.8054 ほぼ直角二等辺三角形
|
| コンテスト | |
| ユーザー |
tempura_pp
|
| 提出日時 | 2019-03-29 18:07:22 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 477 bytes |
| コンパイル時間 | 1,495 ms |
| コンパイル使用メモリ | 167,236 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-07 01:21:28 |
| 合計ジャッジ時間 | 2,888 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 18 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ll T;
cin>>T;
ll s=3, t=2, a, b, c, m, n, nxts, nxtt;
while(1){
m=abs(s-t);
n=t;
a=abs(m*m-n*n);
b=2*m*n;
c=m*m+n*n;
int d=log10(c);
if(T-1<=d&&d<T)break;
nxts=s+2*t;
nxtt=s+t;
s=nxts;
t=nxtt;
}
if(a>b)swap(a,b);
cout<<a<<endl;
cout<<b<<endl;
cout<<c<<endl;
return 0;
}
tempura_pp