結果

問題 No.141 魔法少女コバ
ユーザー sggkshio
提出日時 2017-06-20 08:12:49
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 373 ms / 5,000 ms
コード長 501 bytes
コンパイル時間 808 ms
コンパイル使用メモリ 81,604 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-02 08:05:31
合計ジャッジ時間 4,913 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 93
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include <sstream>
#include<iomanip>

//#include<bits/stdc++.h>


using namespace std;



int main() {
	int s = 0; int a, b;
	cin >> a >> b;
	while (a != b) {
		if (a < b)swap(a, b);
		else a -= b;
		s++;
	}
	cout << s << endl;
	return 0;
}
0