結果
問題 | No.81 すべて足すだけの簡単なお仕事です。 |
ユーザー |
![]() |
提出日時 | 2016-09-11 16:12:15 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,265 bytes |
コンパイル時間 | 240 ms |
コンパイル使用メモリ | 32,244 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 03:27:11 |
合計ジャッジ時間 | 1,110 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 WA * 17 |
ソースコード
program mainimplicit noneinteger*8::N,i,dot,len,borrow,carryinteger*8::big,small,big_t,small_tinteger*8,parameter::keta=10000000000_8character*22::inputdata big_t,small_t/2*0/read *,Ndo i=1,Nread *,inputlen = LEN_TRIM(input)dot = SCAN(input,'.')if(dot.ne.0) thenread (input(1:dot-1),*) bigread (input(dot+1:len),*) smallsmall = 10**(10-len+dot)*smallelseread (input(1:len),*) bigsmall = 0end ifif(input(1:1).eq.'-') thenbig_t = big_t + bigsmall_t = small_t - smallelsebig_t = big_t + bigsmall_t = small_t + smallend ifend doif((small_t.ge.0.and.big_t.ge.0).or. &(small_t.le.0.and.big_t.le.0)) thencarry = small_t/ketabig_t = big_t + carrysmall_t = MOD(small_t,keta)elseif(big_t.le.0) thenbig_t = -big_tsmall_t = -small_tborrow = small_t/keta + 1big_t = big_t - borrowsmall_t = borrow*keta + small_tbig_t = -big_telseborrow = small_t/keta + 1big_t = big_t - borrowsmall_t = borrow*keta + small_tend ifend ifprint '(i0,".",i10.10)',big_t,small_tend program main