减去15即可(注意这个数小于15的情况) 题目:珊珊到了美国犹他州的杨百翰大学之后,文文禁不住对她的思念,常常想打电话给她,却又担心在美国的她是不是在睡觉.好不容易鼓起勇气打通了电话,第一句就先问:「你那里现在几点了?」请你帮文文写一个程序,输入台湾时间后,算出美国山区时间. #include <iostream> using namespace std; int main () { int time; cin >> time; cout <<(time+-)%: ;…
Description As we all know, Coach Gao is a talented chef, because he is able to cook M dishes in the same time. Tonight he is going to have a hearty dinner with his girlfriend at his home. Of course, Coach Gao is going to cook all dishes himself, in…
Co-prime Array Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 660A Description You are given an array of n elements, you must make it a co-prime array in as few moves as possible. In e…
A . 问一组数能否全部被3整除 K. S1 = A, S2 = B, Si = |Si-1 - Si-2|; 一直循环问, 出现了多少不同的数: 多模拟几组数, 可以发现和辗转相除法有很大关系 #include<bits/stdc++.h> using namespace std; #define ll long long ll gcd(ll a, ll b) { ll cnt = ; // 一开始写的是 int wa 了很多次, 难受 ); cnt += a/b; cnt += gcd…