题解___CodeForces 527A___2015_10_个人赛_1004
来源:互联网 发布:我欲封天灵珠升阶数据 编辑:程序博客网 时间:2024/05/16 02:11
该题目要先用除法(第一次给出的宽度能形成多少个正方形)缩短时间,然后细化余下的纸条#include <cstdio>
#include <cstdio>using namespace std;int main(){ long long a,b,ans; while(scanf("%I64d%I64d",&a,&b) != EOF) { ans = a / b; if(a % b == 0) { printf("%I64d\n",ans); } else { while(a % b) { long long int tempdata = a % b; a = b; b = tempdata; ans += a / b; } printf("%I64d\n",ans); } } return 0;}
0 0
- 题解___CodeForces 527A___2015_10_个人赛_1004
- 题解___CodeForces 558A___2015_10_个人赛_1001
- 题解___CodeForces 454A___10月___个人赛
- 个人赛重开123题解
- qtech 第一次个人赛题解
- 百练_1004:财务管理
- LeetCode_个人题解
- 第七届蓝桥杯省赛个人题解
- leetcode-个人题解2
- leetcode-个人题解4
- leetcode-个人题解8
- leetcode-个人题解23
- leetcode-个人题解6
- leetcode-个人题解12
- Leetcode个人题解455
- Leetcode个人题解10
- Leetcode-个人题解718
- Leetcode个人题解714
- 【Python】Learn Python the hard way, ex33 while循环
- 设计模式之桥接模式
- DevExpress SpreadsheetControl 分组
- 在线聊天室小程序
- 【Foundaton-10-3】#import <Foundation/NSArray.h>字符串操作
- 题解___CodeForces 527A___2015_10_个人赛_1004
- 怎样将Excel里的行和列隐藏和取消隐藏
- C/C++ 32位/64位 sizeof(数据类型)
- Spring官网改版后下载
- 《剑指Offer》面试题:连续子数组的最大和
- mysql查询实例
- 虚基类中的虚函数在部分虚函数表中为0
- hdu 4096
- C++编程实现单链表的逆置