洛谷 P1055 [NOIP2008 普及组] ISBN 号码
更多...
#include <luogu.h>
|
static int | main (istream &cin, ostream &cout) |
|
洛谷 P1055 [NOIP2008 普及组] ISBN 号码
在文件 luogu.h 第 186 行定义.
◆ main()
int luogu::P1055::main |
( |
istream & |
cin, |
|
|
ostream & |
cout |
|
) |
| |
|
static |
在文件 luogu.cpp 第 483 行定义.
486 const string isbn_prefix = isbn.substr(0, isbn.length() - 1);
489 for(
const char ch: isbn_prefix) {
490 if(isdigit(ch) != 0) {
491 sum += (ch -
'0') * count++;
496 int end = *isbn.rbegin() -
'0';
497 if(end ==
'X' -
'0') {
507 cout << isbn_prefix << static_cast<char>(end +
'0');
被这些函数引用 luogu::TEST().
该类的文档由以下文件生成: