結果
| 問題 |
No.141 魔法少女コバ
|
| コンテスト | |
| ユーザー |
tetsuzuki1115
|
| 提出日時 | 2017-10-05 12:53:32 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 723 ms / 5,000 ms |
| コード長 | 597 bytes |
| コンパイル時間 | 594 ms |
| コンパイル使用メモリ | 79,196 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-16 20:59:40 |
| 合計ジャッジ時間 | 6,475 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 93 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <cmath>
#include <limits.h>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <functional>
#include <stdio.h>
using namespace std;
long long MOD = 1000000007;
int main() {
long long M, N;
cin >> M >> N;
long long ans = 0;
while ( true ) {
if ( N == M ) { break; }
else if ( M > N ) { M -= N; }
else if ( M < N ) { swap(M,N); }
ans++;
}
cout << ans << endl;
return 0;
}
tetsuzuki1115