結果
問題 | No.378 名声値を稼ごう |
ユーザー | samplelpmas |
提出日時 | 2017-01-01 17:50:23 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 124 ms / 2,000 ms |
コード長 | 450 bytes |
コンパイル時間 | 2,060 ms |
コンパイル使用メモリ | 72,468 KB |
実行使用メモリ | 56,064 KB |
最終ジャッジ日時 | 2023-09-12 09:28:54 |
合計ジャッジ時間 | 3,471 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 121 ms
55,704 KB |
testcase_01 | AC | 121 ms
55,820 KB |
testcase_02 | AC | 122 ms
55,708 KB |
testcase_03 | AC | 124 ms
56,064 KB |
testcase_04 | AC | 124 ms
55,888 KB |
testcase_05 | AC | 122 ms
55,540 KB |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long prestige = sc.nextLong(); long withSkill = prestige * 2; long withoutSkill = 0; while (0 < prestige) { withoutSkill += prestige; prestige /= 2; } long diff = withSkill - withoutSkill; System.out.println(diff); } }