結果
問題 | No.141 魔法少女コバ |
ユーザー |
![]() |
提出日時 | 2015-02-01 23:44:38 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 341 ms / 5,000 ms |
コード長 | 394 bytes |
コンパイル時間 | 1,081 ms |
コンパイル使用メモリ | 157,904 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-23 05:34:32 |
合計ジャッジ時間 | 4,505 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 93 |
ソースコード
#include <bits/stdc++.h> #define INF INT_MAX / 2 #define MOD 1000000007 using namespace std; typedef pair<int,int> PII; typedef pair<int,pair<int,int>> PIPII; typedef long long ll; int dx[] = {0,1,0,-1}; int dy[] = {1,0,-1,0}; int main(void){ int m,n; cin >> m >> n; int cnt = 0; while(m != n){ if(m < n)swap(n,m); else{ m -= n; } cnt++; } cout << cnt << endl; return 0; }