为什么只得了40分

18602826363 2025-08-20 13:33:27 8

#include <bits/stdc++.h> using namespace std; long long n,m,cnt; int main(){ cin>>n>>m; int t=n*m; int a[1005]={}; while(t!=0){ cnt++; a[cnt]=t%10; t/=10; } for(int i=1;i<=cnt;i++){ cout<<a[i]; } return 0; }

{{ vote && vote.total.up }}

共 3 条回复

18602826363

为什么只得了80分: #include <bits/stdc++.h> using namespace std; long long n,m,cnt; int main(){ cin>>n>>m; long long t=n*m; long long a[1005]={}; while(t!=0){ cnt++; a[cnt]=t%10; t/=10; } if(a[1]==0){ for(int i=2;i<=cnt;i++) cout<<a[i]; return 0; } for(int i=1;i<=cnt;i++){ cout<<a[i]; } return 0; }

18602826363

三克油

root 站长

输入2 10,答案是2,你输出了个02