結果

問題 No.3054 ほぼ直角二等辺三角形
ユーザー tubuanntubuann
提出日時 2019-04-01 22:00:45
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,178 bytes
コンパイル時間 1,339 ms
コンパイル使用メモリ 137,300 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-18 01:04:25
合計ジャッジ時間 2,744 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 AC 1 ms
4,376 KB
testcase_17 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iomanip>
#include<limits>
#include<thread>
#include<utility>
#include<iostream>
#include<string>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<stack>
#include<queue>
#include<cmath>
#include<numeric>
#include<cassert>
#include<random>
#include<chrono>
#include<unordered_set>
#include<unordered_map>
#include<fstream>
#include<list>
#include<functional>
#include<bitset>
#include<complex>
#include<tuple>
using namespace std;
/*
 typedef unsigned long long int ull;
 typedef long long int ll;
 */
typedef unsigned long long int ll;
typedef pair<ll,ll> pll;
typedef pair<int,int> pi;
typedef pair<double,double> pd;
typedef pair<double,ll> pdl;
#define F first
#define S second
const ll E=1e18+7;
const ll MOD=1000000007;

ll cnt(ll a){
    ll cnt=0;
    while(a>0){
        a/=10;
        cnt++;
    }
    return cnt;
}


int main(){
    vector<ll> A={3,20,119};
    vector<ll> B={5,29,169};
    ll x;
    cin>>x;
    while(cnt(B[0])<x){
        B[0]=B[1];
        B[1]=B[2];
        B[2]=B[1]*6-B[0];
        A[0]=A[1];
        A[1]=A[2];
        A[2]=A[1]*6-A[0]+2;
    }
    cout<<A[0]<<" "<<A[0]+1<<" "<<B[0]<<endl;
    
    return 0;
}
0