結果
| 問題 |
No.976 2 の 128 乗と M
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-01-29 23:15:33 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 192 bytes |
| コンパイル時間 | 345 ms |
| コンパイル使用メモリ | 27,520 KB |
| 最終ジャッジ日時 | 2025-01-08 20:43:56 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 50 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:15: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | i64 M; scanf("%ld", &M);
| ~~~~~^~~~~~~~~~~
ソースコード
#include <cstdint>
#include <cstdio>
using i64 = int64_t;
int main(void) {
i64 M; scanf("%ld", &M);
i64 res = static_cast<i64>(-__uint128_t(M) % M);
printf("%ld\n", res);
return 0;
}