結果
| 問題 |
No.378 名声値を稼ごう
|
| コンテスト | |
| ユーザー |
kohaku_kohaku
|
| 提出日時 | 2016-11-10 01:53:05 |
| 言語 | Java (openjdk 23) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 348 bytes |
| コンパイル時間 | 1,919 ms |
| コンパイル使用メモリ | 73,904 KB |
| 実行使用メモリ | 54,372 KB |
| 最終ジャッジ日時 | 2024-11-25 06:09:08 |
| 合計ジャッジ時間 | 3,200 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 2 RE * 3 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long N = sc.nextInt();
long sumA = 0;
long sumB = N;
N=N/2;
while(N!=0){
sumA = sumA + N;
N=N/2;
}
System.out.println(sumB-sumA);
}
}
kohaku_kohaku