結果
問題 | No.146 試験監督(1) |
ユーザー | bal4u |
提出日時 | 2019-04-11 17:09:03 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 16 ms / 1,000 ms |
コード長 | 511 bytes |
コンパイル時間 | 1,230 ms |
コンパイル使用メモリ | 28,804 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-26 04:18:18 |
合計ジャッジ時間 | 1,229 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
4,380 KB |
testcase_01 | AC | 16 ms
4,380 KB |
testcase_02 | AC | 15 ms
4,380 KB |
ソースコード
// yukicoder: No.146 試験監督(1) // 2019.4.11 bal4u #include <stdio.h> #include <stdlib.h> #if 0 #define gc() getchar_unlocked() #else #define gc() getchar() #endif long long in() { int c = gc(); long long n = 0; do n = 10 * n + (c & 0xf), c = gc(); while (c >= '0'); return n; } #define M 1000000007 int main() { int N; long long c, d, ans; N = (int)in(); ans = 0; while (N--) { c = ((in()+1)>>1) % M, d = in() % M; ans += (c * d) % M; } printf("%d\n", (int)(ans % M)); return 0; }