結果
問題 |
No.378 名声値を稼ごう
|
ユーザー |
|
提出日時 | 2016-06-20 18:23:30 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 131 ms / 2,000 ms |
コード長 | 322 bytes |
コンパイル時間 | 3,144 ms |
コンパイル使用メモリ | 73,976 KB |
実行使用メモリ | 54,452 KB |
最終ジャッジ日時 | 2024-06-29 13:59:40 |
合計ジャッジ時間 | 4,596 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 |
ソースコード
import java.util.Scanner; public class LoL { public static void main(String[] args) { long l = 0; int t = 0; Scanner sc = new Scanner(System.in); long N = sc.nextLong(); long k = N; long by = N*2; while(k!=0){ l+=k; k = k/2; } t = (int) ((int)by - l); System.out.println(t); sc.close(); } }