結果
| 問題 |
No.784 「,(カンマ)」
|
| コンテスト | |
| ユーザー |
rabi
|
| 提出日時 | 2019-08-15 14:55:33 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 473 bytes |
| コンパイル時間 | 2,324 ms |
| コンパイル使用メモリ | 73,276 KB |
| 実行使用メモリ | 37,240 KB |
| 最終ジャッジ日時 | 2024-09-19 15:18:42 |
| 合計ジャッジ時間 | 2,953 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 7 WA * 3 |
ソースコード
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder(br.readLine());
int l = sb.length();
for(int i=l-1; i>=0; i--){
if ((l-i)%3==0) sb.insert(i,",");
}
System.out.println(sb);
}
}
rabi