結果
| 問題 | No.146 試験監督(1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-30 21:22:21 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 46 ms / 1,000 ms |
| コード長 | 266 bytes |
| 記録 | |
| コンパイル時間 | 147 ms |
| コンパイル使用メモリ | 29,636 KB |
| 最終ジャッジ日時 | 2026-02-23 23:02:20 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%llu",&n);
| ^~~~~~~~~~~~~~~~
main.c:8:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%llu%llu",&c,&d);
| ^~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#define K 1000000007
int main(void){
unsigned long long int n,c,d,r=0,i;
scanf("%llu",&n);
for(i = 1;i <= n;i++){
scanf("%llu%llu",&c,&d);
if(c%2){c = (c+1)/2;}else{c/=2;}
r+=(((c%K)*(d%K))%K);
r%=K;
}
printf("%llu\n",r);
return 0;
}