1878 - 【C语言训练】8除不尽的数
一个自然数被8除余1,所得的商被8除也余1,
再将第二次的商被8除后余7,最后得到一个商为a.
又知这上自然数被17除余4.所得的商被17除余15,
最的得到一个商是a的2倍.
求这个自然数.
题目输入
题目输出
1993
输入/输出样例
题目输入
题目输出
C++解答
#include <iostream> #include <fstream> #include <string> #include <time.h> #include <vector> #include <map> #include <queue> #include <algorithm> #include <cstring> #include <cmath> #include <set> #include <vector> using namespace std; template <class T> inline bool rd(T &ret) { char c; int sgn; if (c = getchar(), c == EOF) return 0; while (c != '-' && (c<'0' || c>'9')) c = getchar(); sgn = (c == '-') ? -1 : 1; ret = (c == '-') ? 0 : (c - '0'); while (c = getchar(), c >= '0'&&c <= '9') ret = ret * 10 + (c - '0'); ret *= sgn; return 1; } template <class T> inline void pt(T x) { if (x <0) { putchar('-'); x = -x; } if (x>9) pt(x / 10); putchar(x % 10 + '0'); } const int N = 1e6 + 10; typedef long long ll; string str; string s = "32"; vector<string> G; int main(){ puts("1993"); return 0; } /* */