結果
問題 | No.784 「,(カンマ)」 |
ユーザー | rabi |
提出日時 | 2019-08-15 14:55:33 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 473 bytes |
コンパイル時間 | 2,121 ms |
コンパイル使用メモリ | 74,460 KB |
実行使用メモリ | 53,484 KB |
最終ジャッジ日時 | 2023-10-19 19:03:20 |
合計ジャッジ時間 | 3,470 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 55 ms
36,948 KB |
testcase_02 | WA | - |
testcase_03 | AC | 53 ms
52,484 KB |
testcase_04 | AC | 54 ms
52,844 KB |
testcase_05 | WA | - |
testcase_06 | AC | 56 ms
52,848 KB |
testcase_07 | AC | 54 ms
52,560 KB |
testcase_08 | WA | - |
testcase_09 | AC | 54 ms
36,756 KB |
testcase_10 | AC | 54 ms
36,744 KB |
testcase_11 | WA | - |
testcase_12 | AC | 54 ms
36,776 KB |
ソースコード
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); } }