CF1081A

CF1081A

题意:

从 ? 开始每次减去一个不是 ?的约数的数,问最小能得到多少?

做法:

因为 $ n $ 一定于 $ n-1 $ 互质,所以直接减去 $ n-1 $ 就行了。

CODE:

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>

using namespace std;

int n;

int main() {
    scanf("%d",&n);
    if(n == 2) puts("2");
    else puts("1");
    return 0;
}

转载于:https://www.cnblogs.com/Repulser/p/10519485.html

{"app_name":"Installer","timestamp":"2025-03-19 17:04:54.00 +0800","app_version":"6.2.0","slice_uuid":"4ae2bdd4-239d-3997-91cf-fcd007947673","build_version":"1131","platform":0,"bundleID":"com.apple.installer","share_with_app_devs":0,"is_first_party":1,"bug_type":"309","os_version":"macOS 13.2.1 (22D68)","roots_installed":0,"name":"Installer","incident_id":"2A0F9FA4-294B-48D3-A886-4C1A40776F62"} { "uptime" : 23000, "procRole" : "Foreground", "version" : 2, "userID" : 501, "deployVersion" : 210, "modelCode" : "MacBookPro17,1", "coalitionID" : 4237, "osVersion" : { "train" : "macOS 13.2.1", "build" : "22D68", "releaseType" : "User" }, "captureTime" : "2025-03-19 17:04:54.0449 +0800", "incident" : "2A0F9FA4-294B-48D3-A886-4C1A40776F62", "pid" : 3791, "translated" : true, "cpuType" : "X86-64", "roots_installed" : 0, "bug_type" : "309", "procLaunch" : "2025-03-19 17:04:25.0762 +0800", "procStartAbsTime" : 573181073073, "procExitAbsTime" : 573875955811, "procName" : "Installer", "procPath" : "\/System\/Library\/CoreServices\/Installer.app\/Contents\/MacOS\/Installer", "bundleInfo" : {"CFBundleShortVersionString":"6.2.0","CFBundleVersion":"1131","CFBundleIdentifier":"com.apple.installer"}, "buildInfo" : {"ProjectName":"Installer","SourceVersion":"1131000000000000","BuildVersion":"1008"}, "storeInfo" : {"deviceIdentifierForVendor":"0DEC46C8-DECB-50A1-9B30-ACAAA6C29F2E"}, "parentProc" : "launchd", "parentPid" : 1, "coalitionName" : "com.apple.installer", "crashReporterKey" : "BEB86B0A-A37E-7DA0-4384-8CDA4FCBA770", "wakeTime" : 1081, "sleepWakeUUID" : "21FC250E-1FCF-4589-8844-330396D4C5F5", "sip" : "disabled", "vmRegionInfo" : "0x20 is not in any region. Bytes before following region: 140722817843168\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> \n mapped file 7ffc9591c000-7ffca03e8000 [170.8M]
03-20
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值