Submission #00119
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #include<stdio.h> signed main(){ long long n,b,i,z=0,a=998244353; char c[1]; scanf ( "%lld" ,&n); for (i=0;i<n;i++){ scanf ( "%s %lld" ,c,&b); if (b!=0){ b=b%a; } if (b<0){ b +=a; } if (c[0]== '+' ){ z=z+b; } if (c[0]== '-' ){ z=z-b; } if (c[0]== '*' ){ z=z*(b%a); } if (z!=0){ z %=a; } if (z<0){ z +=a; } } printf ( "%lld\n" ,z); return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0005 - Modulo Calculation |
ユーザー名 | ei2037 |
投稿日時 | 2020-07-14 17:49:15 |
言語 | C |
状態 | Wrong Answer |
得点 | 0 |
ソースコード長 | 602 Byte |
最大実行時間 | 98 ms |
最大メモリ使用量 | 692 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 50 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
input01 | AC | 29 ms | 376 KB |
1
|
input02 | WA | 16 ms | 400 KB |
1
|
input03 | WA | 40 ms | 452 KB |
1
|
input04 | WA | 17 ms | 404 KB |
1
|
input05 | WA | 55 ms | 424 KB |
1
|
input06 | WA | 23 ms | 384 KB |
1
|
input07 | WA | 57 ms | 404 KB |
1
|
input08 | WA | 19 ms | 460 KB |
1
|
input09 | WA | 36 ms | 508 KB |
1
|
input10 | WA | 21 ms | 560 KB |
1
|
input11 | WA | 52 ms | 516 KB |
1
|
input12 | WA | 23 ms | 532 KB |
1
|
input13 | WA | 86 ms | 456 KB |
1
|
input14 | WA | 20 ms | 420 KB |
1
|
input15 | WA | 15 ms | 428 KB |
1
|
input16 | AC | 47 ms | 476 KB |
1
|
input17 | WA | 77 ms | 436 KB |
1
|
input18 | WA | 21 ms | 480 KB |
1
|
input19 | WA | 67 ms | 376 KB |
1
|
input20 | WA | 35 ms | 424 KB |
1
|
input21 | WA | 71 ms | 472 KB |
1
|
input22 | WA | 85 ms | 400 KB |
1
|
input23 | WA | 59 ms | 580 KB |
1
|
input24 | WA | 77 ms | 508 KB |
1
|
input25 | WA | 49 ms | 560 KB |
1
|
input26 | WA | 41 ms | 612 KB |
1
|
input27 | WA | 54 ms | 660 KB |
1
|
input28 | WA | 20 ms | 616 KB |
1
|
input29 | WA | 64 ms | 636 KB |
1
|
input30 | WA | 37 ms | 692 KB |
1
|
input31 | WA | 89 ms | 648 KB |
1
|
input32 | WA | 86 ms | 540 KB |
1
|
input33 | WA | 26 ms | 492 KB |
1
|
input34 | WA | 38 ms | 504 KB |
1
|
input35 | WA | 21 ms | 556 KB |
1
|
input36 | WA | 17 ms | 632 KB |
1
|
input37 | WA | 98 ms | 648 KB |
1
|
input38 | WA | 87 ms | 480 KB |
1
|
input39 | WA | 85 ms | 524 KB |
1
|
input40 | WA | 87 ms | 540 KB |
1
|
input_sample01 | WA | 20 ms | 592 KB |
1
|
input_sample02 | WA | 21 ms | 636 KB |
1
|