結果

問題 No.784 「,(カンマ)」
ユーザー chacoder1
提出日時 2020-12-11 22:59:11
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 382 bytes
コンパイル時間 2,138 ms
コンパイル使用メモリ 192,476 KB
最終ジャッジ日時 2025-01-16 22:27:22
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 6 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
  string S;
  cin>>S;
  if(S.length()<=3){
    cout<<S<<endl;
    return 0;
  }
  if(S.length()<=6){
    cout<<S.substr(0,3)<<","<<S.substr(3,3)<<endl;
  return 0;
  }
  if(S.length()<=9){
    cout<<S.substr(0,3)<<","<<S.substr(3,3)<<","<<S.substr(6,3)<<endl;
  return 0;
  }  
  cout<<"1,000,000,000"<<endl;
  return 0;
}
0