当前位置:网站首页>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 ?
边栏推荐
- Latex tips slash \backslash
- C # learning notes: structure of CS documents
- What are the main investment products of bond funds and what are they
- Kiss number + close contact problem
- [leetcode daily question] a single element in an ordered array
- Johnson–Lindenstrauss Lemma
- Will the memory of ParticleSystem be affected by maxparticles
- Create template profile
- Measurement fitting based on Halcon learning [4] measure_ arc. Hdev routine
- Solve the problem that the tabbar navigation at the bottom of vantui does not correspond to the page (window.loading.hash)
猜你喜欢
Résumé: entropie, énergie libre, symétrie et dynamique dans le cerveau
When tidb meets Flink: tidb efficiently enters the lake "new play" | tilaker team interview
Yyds dry goods inventory hand-in-hand teach you the development of Tiktok series video batch Downloader
What is the intelligent monitoring system of sewage lifting pump station and does it play a big role
Applet graduation project is based on wechat classroom laboratory reservation applet graduation project opening report function reference
Small program graduation project based on wechat reservation small program graduation project opening report reference
The automatic control system of pump station has powerful functions and diverse application scenarios
Valentine's Day - 9 jigsaw puzzles with deep love in wechat circle of friends
Chain ide -- the infrastructure of the metauniverse
The "message withdrawal" of a push message push, one click traceless message withdrawal makes the operation no longer difficult
随机推荐
Learn these super practical Google browser skills, girls casually flirt
ZABBIX API pulls the values of all hosts of a monitoring item and saves them in Excel
How to subcontract uniapp and applet, detailed steps (illustration) # yyds dry goods inventory #
中電資訊-信貸業務數字化轉型如何從星空到指尖?
Unity knapsack system (code to center and exchange items)
Advanced learning of MySQL -- Application -- index
Chapter 3.4: starrocks data import - Flink connector and CDC second level data synchronization
Question d: Haffman coding
Design and implementation of redis 7.0 multi part AOF
WordPress collection WordPress hang up collection plug-in
Solve the problem that the tabbar navigation at the bottom of vantui does not correspond to the page (window.loading.hash)
Write the first CUDA program
Mysql-15 aggregate function
Iclr2022 | ontoprotein: protein pre training integrated with gene ontology knowledge
Gee import SHP data - crop image
What is the intelligent monitoring system of sewage lifting pump station and does it play a big role
MySQL advanced (Advanced) SQL statement (I)
Basé sur... Netcore Development blog Project Starblog - (14) Implementation of theme switching function
Pytoch residual network RESNET
Amélioration de l'efficacité de la requête 10 fois! 3 solutions d'optimisation pour résoudre le problème de pagination profonde MySQL