题解 | #kiki算数#

kiki算数

https://www.nowcoder.com/practice/bcaf710fb58a44e1b678a890e6e90d7c

#include <iostream>
#include <string>
#include <iomanip>
using namespace std;

int main() {
 int a,b,c;
 string d;
 cin>>a>>b;
 c=a+b;
 if(c >= 100){
  d = to_string(c);
  for(int i=0;i<d.length()-2;i++)
  {
    d[i] = '0';
  }
   c=stoi(d);
   cout<<c;
 }else{
  cout<<c;
 }

 
}

全部评论

相关推荐

点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务