当前位置:网站首页>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 ?
边栏推荐
- C # learning notes: structure of CS documents
- Hamburg University of Technology (tuhh) | intelligent problem solving as integrated hierarchical reinforcement learning
- Talking about custom conditions and handling errors in MySQL Foundation
- Format character%* s
- Pytoch residual network RESNET
- What are the main investment products of bond funds and what are they
- Small program graduation project based on wechat examination small program graduation project opening report function reference
- Résumé: entropie, énergie libre, symétrie et dynamique dans le cerveau
- 14. Process time
- WP collection plug-in free WordPress collection hang up plug-in
猜你喜欢
Comment la transformation numérique du crédit d'information de la Chine passe - t - elle du ciel au bout des doigts?
Backpropagation formula derivation [Li Hongyi deep learning version]
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"
What is the intelligent monitoring system of sewage lifting pump station and does it play a big role
The reasons why QT fails to connect to the database and common solutions
The automatic control system of pump station has powerful functions and diverse application scenarios
WordPress collection WordPress hang up collection plug-in
MySQL advanced (Advanced) SQL statement (I)
Idea if a class cannot be found, it will be red
MySQL workbench use
随机推荐
Small program graduation project based on wechat video broadcast small program graduation project opening report function reference
PTA tiantisai l1-079 tiantisai's kindness (20 points) detailed explanation
Small program graduation design is based on wechat order takeout small program graduation design opening report function reference
Create template profile
Small program graduation project based on wechat examination small program graduation project opening report function reference
VRRP+BFD
Yyds dry goods inventory it's not easy to say I love you | use the minimum web API to upload files
1189. Maximum number of "balloons"
12. Gettimeofday() and time()
Record a problem that soft deletion fails due to warehouse level error
Johnson–Lindenstrauss Lemma
Keep an IT training diary 054- opening and closing
C language black Technology: Archimedes spiral! Novel, interesting, advanced~
What is the student party's Bluetooth headset recommendation? Student party easy to use Bluetooth headset recommended
STM32 key content
Applet graduation design is based on wechat course appointment registration. Applet graduation design opening report function reference
Advanced learning of MySQL -- Application -- index
String: LV1 eat hot pot
Pagoda SSL can't be accessed? 443 port occupied? resolvent
[untitled] the relationship between the metauniverse and digital collections