結果
| 問題 |
No.415 ぴょん
|
| ユーザー |
taba
|
| 提出日時 | 2017-05-18 22:32:56 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 35 ms / 1,000 ms |
| コード長 | 457 bytes |
| コンパイル時間 | 1,329 ms |
| コンパイル使用メモリ | 128,708 KB |
| 最終ジャッジ日時 | 2025-01-05 00:22:14 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
ソースコード
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cassert>
#include <random>
#include <vector>
#include <algorithm>
#include <array>
#include <functional>
#include <utility>
#include <regex>
#include <tuple>
#include <map>
using namespace std;
template<typename T>
constexpr T gcd(T a,T b){
T c=a%b;
if(c==0){
return b;
}
return gcd(b,c);
}
int main(){
int64_t n,d;
-scanf("%ld%ld",&n,&d);
printf("%ld\n",n/gcd(n,d)-1);
return 0;
}
taba