結果
| 問題 | No.415 ぴょん |
| コンテスト | |
| ユーザー |
taba
|
| 提出日時 | 2017-05-18 22:32:43 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 457 bytes |
| 記録 | |
| コンパイル時間 | 696 ms |
| コンパイル使用メモリ | 130,948 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-06 19:03:10 |
| 合計ジャッジ時間 | 1,406 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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