Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
105560 梁颢城 地盘划分 C++ 运行超时 50 2016 MS 252 KB 311 2023-10-07 13:25:17

Tests(5/10):


#include<bits/stdc++.h> using namespace std; int main(){ int a,b; scanf("%d%d",&a,&b); int cnt = 0; while(a != 0 && b != 0){ if(a > b){ cnt += a/b; a = a%b; }else if(b > a){ cnt += b/a; b = b%a; } } printf("%d",cnt); return 0; }


测评信息: