Submission #63179
ソースコード
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 36 | #include<bits/stdc++.h> #include<cmath> #include<queue> #include<algorithm> using namespace std; using ll= long long ; using db= double ; typedef vector< int > vii; typedef vector<ll> vll; typedef vector<string> vstr; typedef vector< bool > vbl; int inf=(1LL<<31)-1; int MOD=1000000007; #define fi(a,b) for(int i=a;i<b;i++) #define fj(a,b) for(int j=a;j<b;j++) #define f_i(a,b) for(int i=a;i<=b;i++) #define f_j(a,b) for(int j=a;j<=b;j++) #define vvii(c,a,b) vector<vector<ii>> c(a,vector<ii>(b,0)) #define vvll(c,a,b) vector<vector<ll>> c(a,vector<ll>(b,0)) #define vvstr(c,a,b) vector<vector<string> c(a,vector<string>(b,0)) #define vvbol(c,a,b) vector<vector<bool>> c(a,vector<bool>(b,true)) signed main() { cin.tie(nullptr); ios_base::sync_with_stdio( false ); int x,y; cin >> x >> y; cout << x+y-__gcd(x,y)+1 << endl; return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0959 - 電線 |
ユーザー名 | <span style="color:#000000;font-weight:bold;">ei2031</span> |
投稿日時 | 2020-08-28 11:46:38 |
言語 | C++17 |
状態 | Accepted |
得点 | 6 |
ソースコード長 | 890 Byte |
最大実行時間 | 38 ms |
最大メモリ使用量 | 696 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 6 / 6 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in1.txt | AC | 38 ms | 604 KB |
1
|
in2.txt | AC | 30 ms | 632 KB |
1
|
in3.txt | AC | 22 ms | 576 KB |
1
|
in4.txt | AC | 25 ms | 664 KB |
1
|
in5.txt | AC | 18 ms | 616 KB |
1
|
in6.txt | AC | 21 ms | 568 KB |
1
|
in7.txt | AC | 21 ms | 520 KB |
1
|
in8.txt | AC | 14 ms | 608 KB |
1
|
in9.txt | AC | 17 ms | 696 KB |
1
|
in10.txt | AC | 19 ms | 560 KB |
1
|
in11.txt | AC | 20 ms | 640 KB |
1
|
in12.txt | AC | 19 ms | 600 KB |
1
|
in13.txt | AC | 21 ms | 684 KB |
1
|
in14.txt | AC | 21 ms | 644 KB |
1
|
in15.txt | AC | 16 ms | 600 KB |
1
|
in16.txt | AC | 18 ms | 556 KB |
1
|
in17.txt | AC | 19 ms | 512 KB |
1
|
in18.txt | AC | 23 ms | 592 KB |
1
|
in19.txt | AC | 24 ms | 548 KB |
1
|
in20.txt | AC | 26 ms | 584 KB |
1
|
in21.txt | AC | 27 ms | 540 KB |
1
|
in22.txt | AC | 21 ms | 496 KB |
1
|
in23.txt | AC | 24 ms | 576 KB |
1
|
in24.txt | AC | 21 ms | 664 KB |
1
|
in25.txt | AC | 20 ms | 624 KB |
1
|