Submission #00083


ソースコード

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
#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;
if(floor(sqrt(tmp))==sqrt(tmp) && tmp>0){
cout<<i<<' '<<sqrt(tmp)<<'\n';
//cout<<(ll)((ll)i*(ll)i+sqrt(tmp)*sqrt(tmp))<<'\n';
//break;
}
}
return(0);
}

ステータス

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

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in01.txt AC 269 ms 476 KB
1
in02.txt AC 183 ms 560 KB
1
in03.txt AC 192 ms 648 KB
1
in04.txt AC 184 ms 604 KB
1
in05.txt WA 184 ms 560 KB
1
in06.txt AC 189 ms 644 KB
1
in07.txt WA 198 ms 596 KB
1
in08.txt AC 186 ms 680 KB
1
in09.txt AC 192 ms 636 KB
1
in10.txt AC 278 ms 592 KB
1
in11.txt AC 195 ms 552 KB
1
in12.txt AC 187 ms 508 KB
1
in13.txt WA 184 ms 588 KB
1
in14.txt AC 198 ms 668 KB
1
in15.txt AC 186 ms 496 KB
1
in16.txt WA 191 ms 580 KB
1
in17.txt WA 199 ms 532 KB
1
in18.txt AC 189 ms 480 KB
1
in19.txt AC 197 ms 564 KB
1
in20.txt WA 194 ms 644 KB
1
in21.txt AC 198 ms 604 KB
1
in22.txt AC 194 ms 688 KB
1
in23.txt AC 197 ms 644 KB
1
in24.txt AC 200 ms 604 KB
1
in25.txt AC 189 ms 564 KB
1
in26.txt AC 196 ms 644 KB
1
in27.txt AC 191 ms 596 KB
1
in28.txt AC 198 ms 552 KB
1
in29.txt AC 208 ms 636 KB
1
in30.txt AC 199 ms 592 KB
1
in31.txt WA 186 ms 548 KB
1
in32.txt WA 187 ms 632 KB
1
in33.txt AC 187 ms 720 KB
1
in34.txt WA 185 ms 672 KB
1
in35.txt AC 188 ms 500 KB
1
in36.txt WA 193 ms 584 KB
1
in37.txt AC 187 ms 532 KB
1
in38.txt AC 191 ms 616 KB
1
in39.txt AC 201 ms 696 KB
1
in40.txt AC 197 ms 648 KB
1
in41.txt AC 190 ms 604 KB
1
in42.txt AC 191 ms 692 KB
1
in43.txt AC 197 ms 648 KB
1
in44.txt AC 194 ms 728 KB
1
in45.txt AC 189 ms 812 KB
1
in46.txt AC 199 ms 644 KB
1
in47.txt AC 200 ms 732 KB
1
in48.txt AC 188 ms 688 KB
1
in49.txt AC 200 ms 768 KB
1
in50.txt AC 192 ms 852 KB
1
in51.txt WA 182 ms 680 KB
1
in52.txt AC 190 ms 764 KB
1
in53.txt AC 191 ms 724 KB
1
in54.txt AC 199 ms 680 KB
1
in55.txt AC 193 ms 764 KB
1
in56.txt AC 206 ms 852 KB
1
in57.txt WA 182 ms 808 KB
1
in58.txt AC 188 ms 764 KB
1
in59.txt AC 193 ms 720 KB
1
in60.txt WA 183 ms 676 KB
1
sample01.txt AC 201 ms 632 KB
1
sample02.txt AC 202 ms 712 KB
1