結果
問題 | No.141 魔法少女コバ |
ユーザー |
|
提出日時 | 2019-08-07 16:13:44 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 403 ms / 5,000 ms |
コード長 | 257 bytes |
コンパイル時間 | 2,165 ms |
コンパイル使用メモリ | 191,996 KB |
最終ジャッジ日時 | 2025-01-07 10:57:21 |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 93 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;int main() {int m,n;cin>>m>>n;int ans=0;while (m!=n) {if (m>n) m-=n;else if (m<n) swap(m,n);ans++;}cout<<ans<<endl;return 0;}