当前位置:网站首页>Contest3145 - the 37th game of 2021 freshman individual training match_ 1: Origami
Contest3145 - the 37th game of 2021 freshman individual training match_ 1: Origami
2022-07-04 02:34:00 【This question AC sleep again】


//
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
ll a,b,temp,ans;
while( ~scanf("%lld%lld",&a,&b) )
{
ans=0;
if( a%b==0 ) printf("%lld\n",a/b); // a%b Lead to a==0 Classification of discussion
else
{
do{ // First while be unable to enter
ans+=a/b;
a%=b;
temp=a,a=b,b=temp;
}while( a%b );
printf("%lld\n",ans+a/b); // division Nonmodular
}
}
return 0;
}//
find:
01 Analyze the data scale 1e12 --> long long
02 Classification of discussion a%b == 0 ?
边栏推荐
- Measurement fitting based on Halcon learning [4] measure_ arc. Hdev routine
- 96% of the collected traffic is prevented by bubble mart of cloud hosting
- Mysql-15 aggregate function
- I stepped on a foundation pit today
- Introduction to graphics: graphic painting (I)
- Hamburg University of Technology (tuhh) | intelligent problem solving as integrated hierarchical reinforcement learning
- 長文綜述:大腦中的熵、自由能、對稱性和動力學
- LV1 previous life archives
- Take you to master the formatter of visual studio code
- Buuctf QR code
猜你喜欢

When tidb meets Flink: tidb efficiently enters the lake "new play" | tilaker team interview

Node write API

LV1 previous life archives

Bugku Zhi, you have to stop him

Unity knapsack system (code to center and exchange items)

false sharing

17. File i/o buffer

Applet graduation project based on wechat selection voting applet graduation project opening report function reference

Chapter 3.4: starrocks data import - Flink connector and CDC second level data synchronization

What are the conditions for the opening of Tiktok live broadcast preview?
随机推荐
Dans la recherche de l'intelligence humaine ai, Meta a misé sur l'apprentissage auto - supervisé
Applet graduation design is based on wechat course appointment registration. Applet graduation design opening report function reference
Will the memory of ParticleSystem be affected by maxparticles
STM32 key content
[untitled] the relationship between the metauniverse and digital collections
7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages
13. Time conversion function
Lichuang EDA learning notes 14: PCB board canvas settings
MySQL workbench use
String & memory function (detailed explanation)
A brief talk on professional modeler: the prospect and professional development of 3D game modeling industry in China
There is no need to authorize the automatic dream weaving collection plug-in for dream weaving collection
基於.NetCore開發博客項目 StarBlog - (14) 實現主題切換功能
JVM performance tuning and practical basic theory - medium
Optimization theory: definition of convex function + generalized convex function
Small program graduation project based on wechat examination small program graduation project opening report function reference
Ai aide à la recherche de plagiat dans le design artistique! L'équipe du professeur Liu Fang a été embauchée par ACM mm, une conférence multimédia de haut niveau.
Global and Chinese market of contour projectors 2022-2028: Research Report on technology, participants, trends, market size and share
When tidb meets Flink: tidb efficiently enters the lake "new play" | tilaker team interview
16. System and process information