• 01 Digit
• Digit Digit全面升级Autodesk Flame至最新一代Linux平台.pdf
• Digit Digit 全面升级 Autodesk Flame 至最新一代 Linux 平台.pdf
• DIGIT-110-AJC-调查 DIGIT 110的最终项目
• ## Digit Count

千次阅读 2021-08-24 15:34:45
Digit Count 比赛主页 我的提交 时间限制：C/C++ 5秒，其他语言10秒 空间限制：C/C++ 262144K，其他语言524288K 64bit IO Format: %lld 题目描述 Dr. Orooji’schildren have played Tetris but are not ...
Digit Count
比赛主页 我的提交

时间限制：C/C++ 5秒，其他语言10秒 空间限制：C/C++ 262144K，其他语言524288K 64bit IO Format: %lld
题目描述
Dr. Orooji’s children have played Tetris but are not willing to help Dr. O with a related problem. Dr. O’s children don’t realize that Dr. O is lucky to have access to 100+ great problem solvers and great programmers today!
Given a range (in the form of two integers) and a digit (0-9), you are to count how many
occurrences of the digit there are in the given range.
输入描述:
There is only one input line; it provides the range and the digit. Each integer for the range will be
between 1000 and 9999 (inclusive) and the digit will be between 0 and 9 (inclusive). Assume the
first integer for the range is not greater than the second integer for the range.

输出描述:
Print the number of occurrences of the digit in the given range.

示例1
输入
复制
1000 1000 0
输出
复制
3
示例2
输入
复制
1000 1001 0
输出
复制
5
示例3
输入
复制
8996 9004 5
输出
复制
0
示例4
输入
复制
9800 9900 5
输出
复制
20
#include<iostream>
#include<set>
#include<cstring>
int  solve(int x,int k){
int sum=0;
int a,b,c,d;
a=x/1000;
if(a==k) sum++;
b=(x-a*1000)/100;
if(b==k) sum++;
d=x%10;
if(d==k) sum++;
c=(x%100-d)/10;
if(c==k) sum++;
return sum;
}
using namespace std;
int main(){
int a,b;
int k;
cin>>a>>b>>k;
int res=0;
for(int i=a;i<=b;i++){
res+=solve(i, k);
}
cout<<res;
}


展开全文
• digit_recognizer:Kaggle的Digit Recognizer机器学习竞赛的存储库
• 今天写的Digit Recognizer属于练习项目，最后的结果只按照测试集的正确率计算排名，没有奖励。解决方案的python代码在Github开源平台上。 Digit Recognizer任务 此任务是在MNIST（一个带Label的数字像素集合）上训练...
• digit_recogniser
• Digit_Recognizer
• frequency-digit
• kaggle digit recognizer
• Digit-recogniser
• Digit-system
• Digit_Recognition
• DigitSum挑战
• Determine the last nonzero digit in value of expression ![](http://poj.org/formula?tex=C_n%5Em%3D%5Cfrac%7Bn%21%7D%7Bm%21%28n-m%29%21%7D) . Input The input contains a single line with n and m ...
• The number of permutation without repetition that has a string S is so big, but in this problem you just need to print the last nonzero digit of it. Input In each test case you have a string S (1 |S...
• Kaggle Digit Recognizer 数据集
• 该文档为Doodle Digit字体下载，是一份很不错的参考资料，具有较高参考价值，感兴趣的可以下载看看
• Digit Recognizer手写数字识别的MINST数据集：包含三个数据文件 sample_submission.csv，test.csv，train.csv
• \$ npm install --save number-digit 用法 const { minInt , minDec , maxDec } = require ( 'number-digit' ) 例子 const { minInt , minDec , maxDec } = require ( 'number-digit' ) let num = 27.1335 let ...
• ## Rightmost Digit

千次阅读 2018-09-05 10:55:31
Given a positive integer N, you should output the most right digit of N^N. Input The input contains several test cases. The first line of the input is a single integer T which ...
Problem Description
Given a positive integer N, you should output the most right digit of N^N.

Input
The input contains several test cases. The first line of the input is a single integer T which is the number of test cases. T test cases follow.
Each test case contains a single positive integer N(1<=N<=1,000,000,000).

Output
For each test case, you should output the rightmost digit of N^N.

Sample Input

2
3
4

Sample Output

7
6

Hint

In the first case, 3 * 3 * 3 = 27, so the rightmost digit is 7.
In the second case, 4 * 4 * 4 * 4 = 256, so the rightmost digit is 6.

对于一个ACM小白来讲，开始的做这种题目我是采用了直接的思维：直接运用pow函数来计算：
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
int n;
int N[100];
int re[100];
while (cin >> n&&n > 0)
{
cin >> n;
for (int i = 0; i < n; i++)
{
cin >> N[i];
}
for (int i = 0; i < n; i++)
{
re[i] = pow(N[i], N[i]);
cout << re[i] % 10 << endl;
}
}
return 0;

}
然后直接报错超时了：

后来查找资料发现是这题使用pow函数会导致数据溢出，超过限制的运行时间,这题还得找规律：找到规律之后可以用打表法来很轻松的实现：
#include<iostream>
using namespace std;
int best[20] = { 0, 1, 4, 7, 6, 5, 6, 3, 6, 9, 0, 1, 6, 3, 6, 5, 6, 7, 4, 9 };
int n, t;
int main()
{
cin >> t;
while (t--) {
cin>>n;
cout << best[n % 20] << endl;
}
return 0;
}

展开全文
• ## digit函数

千次阅读 2017-10-05 19:19:31
digit函数 时间限制: 1000 ms 内存限制: 65536 KB 提交数: 420 通过数: 247  【题目描述】 在程序中定义一函数digit(n,k)，它能分离出整数n从右边数第k个数字。 【输入】 正整数n和k。 【输出】 一个...

digit函数

时间限制: 1000 ms         内存限制: 65536 KB 提交数: 420     通过数: 247

【题目描述】
在程序中定义一函数digit(n,k)，它能分离出整数n从右边数第k个数字。
【输入】
正整数n和k。
【输出】
一个数字。
【输入样例】

31859 3

【输出样例】

8

【来源】

No

【代码】

#include

#include

#include

using namespace std;
void digit(int n,int k)
{
int c;
for(int i=1;i

>n>>k;
digit(n,k);
cout<



  

 【说明】

vc6.0运行成功，提交通过



 
展开全文
• c代码-check digit wrght by first single digit and first group of five digits and secand group of five digits
• For a positive integer N, the digit-sum of N is defined as the sum of N itself and its digits. When M is the digitsum of N, we call N a generator of M. For example, the digit-sum of 245 is 256
For a positive integer N, the digit-sum of  N is defined as the sum of N itself and its digits. When M is the digitsum of N, we call N a generator of  M.
For example, the digit-sum of 245 is 256 (= 245 + 2 + 4 + 5). Therefore, 245 is a generator of 256.
Not surprisingly, some numbers do not have any generators and some numbers have more than one generator. For example, the generators of 216 are 198 and 207.
You are to write a program to find the smallest generator of the given integer.

Input
Your program is to read from standard input. The input consists of  T test cases. The number of test cases T is given in the first line of the input. Each test case takes one line containing an integer N, 1N100, 000.

Output
Your program is to write to standard output. Print exactly one line for each test case. The line is to contain a generator of N for each test case. If N has multiple generators, print the smallest. If N does not have any generators, print 0.
The following shows sample input and output for three test cases.

Sample Input

3
216
121
2005

Sample Output

198
0
1979

这道题使用一个数组将每个数对应的值保存下来，保存最小的，每次只要输出就行了，不过数组开大一点。
#include <stdio.h>
const int maxn = 100005;
int ans[maxn+505];
int bit_sum ( int n )
{
int sum = 0;
while ( n > 0 )
{
sum = sum+n%10;
n = n/10;
}
return sum;
}
int main ( )
{
for ( int i = 1; i <= maxn; i ++ )
{
int s = i+bit_sum ( i );
if ( ans[s] == 0 )
ans[s] = i;
}
int T, n;
scanf ( "%d", &T );
while ( T -- )
{
scanf ( "%d", &n );
printf ( "%d\n", ans[n] );
}
return 0;
}
 
展开全文
• kaggle digit-recoginzer 数字识别数据，用于入门的手写数字识别，常用的deep learning，神经网络，机器学习数据集

...