結果
問題 | No.784 「,(カンマ)」 |
ユーザー |
![]() |
提出日時 | 2019-02-08 21:28:59 |
言語 | Python3 (3.10.1 + numpy 1.22.3 + scipy 1.8.0) |
結果 |
AC
|
実行時間 | 15 ms / 2,000 ms |
コード長 | 426 bytes |
コンパイル時間 | 57 ms |
使用メモリ | 7,784 KB |
最終ジャッジ日時 | 2023-01-28 14:38:41 |
合計ジャッジ時間 | 1,543 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 使用メモリ |
---|---|---|
testcase_00 | AC | 14 ms
7,552 KB |
testcase_01 | AC | 14 ms
7,680 KB |
testcase_02 | AC | 14 ms
7,540 KB |
testcase_03 | AC | 14 ms
7,712 KB |
testcase_04 | AC | 13 ms
7,732 KB |
testcase_05 | AC | 14 ms
7,624 KB |
testcase_06 | AC | 14 ms
7,580 KB |
testcase_07 | AC | 15 ms
7,732 KB |
testcase_08 | AC | 15 ms
7,716 KB |
testcase_09 | AC | 13 ms
7,784 KB |
testcase_10 | AC | 14 ms
7,628 KB |
testcase_11 | AC | 14 ms
7,712 KB |
testcase_12 | AC | 14 ms
7,540 KB |
ソースコード
N = int(input()) ans = "" c9, c6, c3 = 10**9, 10**6, 10**3 if N >= c9: ans = str(N // c9) + "," + "{:03d}".format((N % c9) // c6) + "," + "{:03d}".format((N%c6) // c3) + "," + "{:03d}".format(N % c3) elif N >= c6: ans = str((N % c9) // c6) + "," + "{:03d}".format((N%c6) // c3) + "," + "{:03d}".format(N % c3) elif N >= c3: ans = str((N%c6) // c3) + "," + "{:03d}".format(N % c3) else: ans = str(N) print(ans)