結果

問題 No.141 魔法少女コバ
ユーザー fiord
提出日時 2015-07-04 00:18:25
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 325 ms / 5,000 ms
コード長 192 bytes
コンパイル時間 327 ms
コンパイル使用メモリ 53,720 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-07 22:45:46
合計ジャッジ時間 3,889 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 93
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
	int m,n;	cin>>m>>n;
	int ans=0;
	while(m!=n){
		if(m>n)	m-=n;
		else{
			m^=n;	n^=m;	m^=n;
		}
		ans++;
	}
	cout<<ans<<endl;
	return 0;
}
0