結果
| 問題 | 
                            No.146 試験監督(1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                            👑  testestest
                         | 
                    
| 提出日時 | 2015-08-06 03:28:00 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 36 ms / 1,000 ms | 
| コード長 | 176 bytes | 
| コンパイル時間 | 148 ms | 
| コンパイル使用メモリ | 21,120 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-18 03:37:02 | 
| 合計ジャッジ時間 | 1,186 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 3 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=]
    6 | printf("%d",s);
      |         ~^  ~
      |          |  |
      |          |  long long int
      |          int
      |         %lld
main.c:4:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    4 | scanf("%lld",&n);
      | ^~~~~~~~~~~~~~~~
main.c:5:11: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 | while(n--)scanf("%lld%lld",&a,&b),a=a+1>>1,s=(s+a%x*(b%x))%x;
      |           ^~~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include<stdio.h>
int main(){
long long int n,a,b,s=0,x=1000000007;
scanf("%lld",&n);
while(n--)scanf("%lld%lld",&a,&b),a=a+1>>1,s=(s+a%x*(b%x))%x;
printf("%d",s); 
return 0;
}
            
            
            
        
            
testestest