Submission #00081


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include<bits/stdc++.h>
using namespace std;
template <class A, class B> inline bool chmax(A &a, const B &b) { return b > a && (a = b, true); }
template <class A, class B> inline bool chmin(A &a, const B &b) { return b < a && (a = b, true); }
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
typedef vector<long long> vlong;
typedef vector<string> vstring;
#define _GLIBCXX_DEBUG
#define vpush(a,x) a.push_back(x);
#define rep(i, n) REP(i, 0, n)
#define all(v) v.begin(), v.end()
#define REP(i, x, n) for(int i = x; i < n; i++)
const int INF = 1 << 30;
const int dx[] = {1,0,-1,0,1,1,-1,-1};
const int dy[] = {0,-1,0,1,1,-1,-1,1};
#define stp(x) setprecision(x)
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
ll n;
cin>>n;
REP(i,1,10000000){
ll tmp=n-(ll)i*(ll)i;
double a=sqrt(tmp);
ll b=sqrt(tmp);
if(a==b){
cout<<i<<' '<<sqrt(tmp)<<'\n';
//cout<<i*i+sqrt(tmp)*sqrt(tmp)<<'\n';
break;
}
}
return(0);
}

ステータス

項目 データ
問題 0001 - さらば2020、ようこそ2021
ユーザー名 ei1918
投稿日時 2020-12-30 15:45:17
言語 C++17
状態 Wrong Answer
得点 0
ソースコード長 1032 Byte
最大実行時間 36 ms
最大メモリ使用量 808 KB

セット

セット 得点 Cases
1 ALL 0 / 100 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in01.txt AC 23 ms 600 KB
1
in02.txt AC 27 ms 552 KB
1
in03.txt AC 21 ms 636 KB
1
in04.txt AC 28 ms 592 KB
1
in05.txt WA 23 ms 544 KB
1
in06.txt AC 24 ms 632 KB
1
in07.txt WA 19 ms 460 KB
1
in08.txt AC 32 ms 544 KB
1
in09.txt AC 27 ms 492 KB
1
in10.txt AC 21 ms 568 KB
1
in11.txt AC 22 ms 652 KB
1
in12.txt AC 15 ms 604 KB
1
in13.txt WA 19 ms 688 KB
1
in14.txt AC 19 ms 512 KB
1
in15.txt AC 16 ms 596 KB
1
in16.txt WA 15 ms 552 KB
1
in17.txt WA 19 ms 636 KB
1
in18.txt AC 36 ms 720 KB
1
in19.txt AC 21 ms 672 KB
1
in20.txt WA 19 ms 632 KB
1
in21.txt AC 21 ms 588 KB
1
in22.txt AC 27 ms 540 KB
1
in23.txt AC 16 ms 624 KB
1
in24.txt AC 20 ms 704 KB
1
in25.txt AC 15 ms 660 KB
1
in26.txt AC 18 ms 620 KB
1
in27.txt AC 20 ms 576 KB
1
in28.txt AC 21 ms 656 KB
1
in29.txt AC 25 ms 740 KB
1
in30.txt AC 22 ms 692 KB
1
in31.txt WA 19 ms 516 KB
1
in32.txt WA 23 ms 596 KB
1
in33.txt AC 25 ms 684 KB
1
in34.txt WA 20 ms 764 KB
1
in35.txt AC 23 ms 716 KB
1
in36.txt WA 17 ms 800 KB
1
in37.txt AC 17 ms 628 KB
1
in38.txt AC 24 ms 584 KB
1
in39.txt AC 22 ms 668 KB
1
in40.txt AC 21 ms 748 KB
1
in41.txt AC 21 ms 704 KB
1
in42.txt AC 23 ms 656 KB
1
in43.txt AC 18 ms 612 KB
1
in44.txt AC 24 ms 696 KB
1
in45.txt AC 25 ms 776 KB
1
in46.txt AC 23 ms 736 KB
1
in47.txt AC 20 ms 688 KB
1
in48.txt AC 18 ms 640 KB
1
in49.txt AC 28 ms 728 KB
1
in50.txt AC 22 ms 680 KB
1
in51.txt WA 32 ms 640 KB
1
in52.txt AC 18 ms 728 KB
1
in53.txt AC 25 ms 680 KB
1
in54.txt AC 19 ms 640 KB
1
in55.txt AC 24 ms 728 KB
1
in56.txt AC 15 ms 556 KB
1
in57.txt WA 25 ms 644 KB
1
in58.txt AC 27 ms 728 KB
1
in59.txt AC 18 ms 808 KB
1
in60.txt WA 20 ms 768 KB
1
sample01.txt AC 19 ms 720 KB
1
sample02.txt AC 15 ms 676 KB
1