当前位置:网站首页>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 ?
边栏推荐
- [software implementation series] software implementation interview questions with SQL joint query diagram
- What are the main investment products of bond funds and what are they
- Applet graduation project based on wechat selection voting applet graduation project opening report function reference
- Global and Chinese market of handheld melanoma scanners 2022-2028: Research Report on technology, participants, trends, market size and share
- 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.
- From the 18th line to the first line, the new story of the network security industry
- 14. Process time
- Network byte order
- Pytoch residual network RESNET
- Gee import SHP data - crop image
猜你喜欢

Save Private Ryan - map building + voltage dp+deque+ shortest circuit

Node solves cross domain problems

What is the student party's Bluetooth headset recommendation? Student party easy to use Bluetooth headset recommended

The first spring of the new year | a full set of property management application templates are presented, and Bi construction is "out of the box"

Kiss number + close contact problem

Zblog collection plug-in does not need authorization to stay away from the cracked version of zblog

Li Chuang EDA learning notes IX: layers

The automatic control system of pump station has powerful functions and diverse application scenarios

String & memory function (detailed explanation)

Small program graduation project based on wechat video broadcast small program graduation project opening report function reference
随机推荐
AI 助力藝術設計抄襲檢索新突破!劉芳教授團隊論文被多媒體頂級會議ACM MM錄用
Basic editing specifications and variables of shell script
Measurement fitting based on Halcon learning [4] measure_ arc. Hdev routine
17. File i/o buffer
[software implementation series] software implementation interview questions with SQL joint query diagram
The "message withdrawal" of a push message push, one click traceless message withdrawal makes the operation no longer difficult
JVM performance tuning and practical basic theory - medium
Unspeakable Prometheus monitoring practice
Keepalived set the master not to recapture the VIP after fault recovery (it is invalid to solve nopreempt)
Applet graduation project based on wechat selection voting applet graduation project opening report function reference
長文綜述:大腦中的熵、自由能、對稱性和動力學
Small program graduation project based on wechat reservation small program graduation project opening report reference
Learn these super practical Google browser skills, girls casually flirt
Hunan University | robust Multi-Agent Reinforcement Learning in noisy environment
Global and Chinese market for travel wheelchairs 2022-2028: Research Report on technology, participants, trends, market size and share
Node solves cross domain problems
The automatic control system of pump station has powerful functions and diverse application scenarios
Sword finger offer 14- I. cut rope
The difference between lambda expressions and anonymous inner classes
[Yugong series] February 2022 attack and defense world advanced question misc-84 (MySQL)