結果
問題 |
No.141 魔法少女コバ
|
ユーザー |
![]() |
提出日時 | 2015-02-10 03:09:37 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 241 bytes |
コンパイル時間 | 555 ms |
コンパイル使用メモリ | 54,236 KB |
実行使用メモリ | 8,448 KB |
最終ジャッジ日時 | 2024-06-23 16:55:32 |
合計ジャッジ時間 | 13,127 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 -- * 92 |
ソースコード
#include <iostream> using namespace std; int func(int m, int n) { if (m==0 or n==0) return 0; if (m>n) return m/n+func(m%n, n); return 1+func(n, m); } int main() { int m, n; while (cin>>m>>n) cout<<func(m, n)-1<<endl; }