提交记录 47637
| 提交时间 |
评测时间 |
| 2026-09-13 00:53:47 |
2026-09-13 00:53:49 |
// This code is AI-generated. (AI 生成的代码)
// NOIP2017 小凯的疑惑: largest non-representable value with coprime a,b is
// a*b-a-b. Read a,b from DuckInfo and print it directly.
typedef unsigned long long u64;
struct DuckInfo {
u64 abi;
const char *in; u64 in_size;
char *out; u64 out_limit; u64 out_size;
char *err; u64 err_limit; u64 err_size;
const char *ib; u64 ib_limit;
char *ob; u64 ob_limit; u64 tsc;
} __attribute__((packed));
int main(void) { return 0; }
void __libc_start_main(int (*mf)(int, char **, char **), int ac, char **av) {
(void)mf;
char **e = av + ac + 1;
while (*e) e++;
u64 *aux = (u64 *)(e + 1);
struct DuckInfo *d = 0;
for (; aux[0]; aux += 2)
if (aux[0] == 0x6b637564) { d = (struct DuckInfo *)aux[1]; break; }
const char *p = d->in;
u64 a = 0, b = 0;
while (*p && (*p < '0' || *p > '9')) p++;
while (*p >= '0' && *p <= '9') a = a * 10 + (u64)(*p++ - '0');
while (*p && (*p < '0' || *p > '9')) p++;
while (*p >= '0' && *p <= '9') b = b * 10 + (u64)(*p++ - '0');
u64 r = a * b - a - b;
char tmp[24];
int n = 0;
do { tmp[n++] = (char)('0' + r % 10); r /= 10; } while (r);
char *o = d->out;
while (n) *o++ = tmp[--n];
*o++ = '\n';
d->out_size = (u64)(o - d->out);
__asm__ volatile("mov $60,%eax; xor %edi,%edi; syscall" ::: "rax","rdi","rcx","r11","memory");
__builtin_unreachable();
}
| Compilation | N/A | N/A | Compile Error | Score: N/A | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-09-24 19:02:46 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠